View Single Post
Unread 04-22-2008, 11:58 PM
netman netman is offline
Junior Member
Join Date: Apr 2008
Posts: 2
  #2  
Cool UDM4 Support Technical FAQ - Question #1 omits the entire answer - fixed width solved

Note that the UDM4 Developers provide just enough info in the FAQ to get one intro trouble... On the UDM4 FAQ page, http://www.udm4.com/manual/faq/ the very first Question is:

Quote:
1. The width of the links in a horizontal nav seems to be "auto" - can I override those and set specific dimensions?
To which the (partially erroneous) answer supposedly is:

Quote:
Yes, you can add individual widths by addressing the navbar links and list-items from external CSS - for example give each one a class or id attribute, then set the widths from a normal stylesheet. Please see the Individual item widths documentation for more information.
And, the link/example is given at:
http://www.udm4.com/manual/developme...xternal-widths

Quote:
It should be as simple as applying width to each link in the navbar, but in Opera 7.0 to 7.2 applying a fixed width to floated and positioned elements is problematic - the navbar might collapse, such that the links are all on top of each other. To avoid that we have to apply widths to the list-items as well as to the links; we can't apply them just to list-items, or it won't work in Opera 5. Phew!
However, on my test page,
http://dev.santafecreativetourism.or...tfixwidth.html

The very last style on the page is:

Code:
ul#udm li a, ul#udm li { width:117px; }
and it didn't work - every single top level nav item just spaces out to whatever it damn well pleases.

Even tried highest specificity in-line CSS ala:

Code:
<li style="width:117px;"><a style="width:117px;" href="http://dev.santafecreativetourism.org/contact.html">Contact</a></li>
But no cigar.

The problem appears to be that fixed width li items works ONLY if your fixed-width size is LARGER (longer) than that necessary to display the textual copy.

For example, if on the above page I made the width 217px, then all items WOULD be the same width.

However, notice on my son of suckerfish (free) drop down example,
http://dev.santafecreativetourism.or...tnotiemac.html
My desired behavior of truly fixed width works, and the text simply wraps inside the li to fit.

Thinking that maybe another culprit (in the encrypted and extremely - on purpose - difficult to decipher code) for this unintended no-wrap behavior might be the CSS white-space property, I tried:

Code:
ul#udm li a, ul#udm li {width:117px;white-space:normal;text-align:center;}
Voila - Problem fixed.

UDM - could you please update the answer in your FAQ to address the issue of white-space, CSS and wrapping text, when li 'buttons' are LESS wide than the total space available?
Reply With Quote