Hi,
I’ve noticed that sometimes the links in the dropdown menu extend as wide as they need to be to fit on one line, and sometimes they’re limited.
http://www.screencast.com/t/40Vv0E1EIZsE
I haven’t paid much attention to it till now, but I’m not sure how to work around it. Width is auto, it looks like… how can I ensure it always stays on one line?
Thanks!
Thanks; pretty good solution.
I also found out that this CSS property exists: http://www.w3schools.com/cssref/pr_text_white-space.asp and can be set to “nowrap”. Neat! Of course, since this only seems to happen now and then, I guess I’ll never know if it works, only if it doesn’t work…
Hi,
Yes, the anchor tags are set to width auto, the menu list items are set to width 100% and the sub-menu unordinate list it’s at fixed width so the menu items should expand as long as unordinate list’s fixed width, the point is it should not fall into a second row.
I have tested this and seems like setting white-space: nowrap; to sub-menu’s > menu items dose the job http://screencast.com/t/ohWEvCVFO0os
Hope this helps!
Thanks
Learn something new every day! I was wondering about the width thing the other day on my own project, so good to know. I knew about the CSS nowrap feature as I use that with a news “ticker” on one of my sites to keep it from “busting out” — but didn’t even think about that for the drop down menus in Newspaper! 🙂
-
This reply was modified 11 years by
simchris.
It’s one of the few benefits of being green at web development. I see text overflowing onto the next line and think “That’s a wrap problem” without regard for reasons why it might or might not be appropriate, and it’s a lucky guess. 😉