Menu dropdown width

Posted in: Newspaper
Post count: 388

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!

Post count: 9544

I think you can try using non breaking spaces in the title, but haven’t tried that. I did notice this also the other day 🙂

but try this Letter to the Editor

I’m sure Marius will have a “real” answer about this.

Post count: 388

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…

Post count: 6600

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

Post count: 388

Thanks 🙂

Post count: 9544

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.
Post count: 388

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. 😉

Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.