MozillaZine

white-space nowrap stopped working

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
jcobban
 
Posts: 122
Joined: February 4th, 2006, 7:34 pm

Post Posted November 7th, 2015, 8:15 pm

I have a number of pages on which I have the following:

<div class='row'><label ...><textarea ...><div style='clear: both;'></div>

The textarea is overlaid by tinyMCE with a <span class='mceEditor defaultSkin'>...

The CSS for div.row specifies white-space:nowrap but if there is not enough room for the label and the MCE editor widget all of a sudden this week when I applied the latest fixes, firefox 42.0+build2-0ubuntu0.15.04.1, the browser started inserting a break. I do not want the break. I intend that the editor widget extend past the right edge of the window. That is why I specified white-space: nowrap. It looks sloppy when the widget is forced down below the label onto a new line.

I also looked at the page with Chromium and it ALSO inserts a break.

How do I get white-space: nowrap to work?

Frenzie

User avatar
 
Posts: 2110
Joined: May 5th, 2004, 10:40 am
Location: Belgium

Post Posted November 9th, 2015, 1:21 am

Do you have a working example to investigate with e.g. Firebug?
Intelligent alien life does exist, otherwise they would have contacted us.

jcobban
 
Posts: 122
Joined: February 4th, 2006, 7:34 pm

Post Posted November 10th, 2015, 8:43 pm

Frenzie wrote:Do you have a working example to investigate with e.g. Firebug?

On my site TinyMCE is used for editing remarks associated with various records, so it is only displayed to registered users since I want to track who changes things. For example if you go to http://www.jamescobban.net/Canada/BirthRegDetail.php?RegDomain=CAON&RegYear=1885&RegNum=20348 as a casual visitor you don't see an editor and all of the fields are read-only because you don't have permission to modify the record. However if you click on the "contribute" button and register as a contributor to the site, log on and then go to the above URL you will see the TinyMCE editor widget, and all of the input fields are writable. If you are registering just to be able to help me out on this remember to decline being added to the e-mail list. If you then shrink the window you will see the editor widget being moved down below its label. When I look at the widget through Firebug it tells me that white-space: nowrap is inherited from the <div class='row'>

Frenzie

User avatar
 
Posts: 2110
Joined: May 5th, 2004, 10:40 am
Location: Belgium

Post Posted November 13th, 2015, 2:59 am

Okay, so it's not overwritten by another rule with higher specificity from TinyMCE itself. That's all I wanted to ascertain. Besides that the usual advice about a minimal testcase applies.
Intelligent alien life does exist, otherwise they would have contacted us.

jscher2000

User avatar
 
Posts: 10077
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted November 19th, 2015, 7:39 pm

Hmm, here is a TinyMCE demo page: http://www.tinymce.com/tryit/full.php

You'll notice that that page uses a div with display:block. As far as I can tell, white-space:nowrap won't keep a block level child element from wrapping, only an inline child element.

Return to Web Development / Standards Evangelism


Who is online

Users browsing this forum: No registered users and 3 guests