Forum Moderators: open

Message Too Old, No Replies

Wrapping <li>s in to fit a div

anything else seems to work...

         

dingman

3:48 pm on Oct 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've got a site in development where I'm trying to do all the layout with CSS rather than tables for the next revision. The navbar is a set of nested lists of links in a div on the left side of the page. Overflow is set to auto, and I can put litterally the entire text of 'Hamlet' in that navigation bar and have it word-wrap at 18% of the screen width, but the lists don't. Depending on the browser they either extend over the content of the right side of the page, which is a bit unreadable, or get clipped, which is completely unreadable. I tried setting display to 'inline', and that just made the bullets go away without changing anything else. Any ideas?

volatilegx

3:58 pm on Oct 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



did you try setting a style to the <ul> or <ol>? or possibly to the <li> tag itself? Maybe if you set it to a particular width or set its wrapping option.

dingman

4:11 pm on Oct 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did to the <li>, not to the <ul>. I'll give it a try and report back.

RossWal

4:52 pm on Oct 16, 2002 (gmt 0)

10+ Year Member



I stickied you with some code that works for me. I think I included all relevant CSS. There is nothing special in it that enables wrapping, it just seems to work. One difference is my left margin is fixed, not a percentage. Feel free to post code here if appropriate, I'm not sure.

Ross

PS Only tested on IE 6.

dingman

10:21 pm on Oct 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Volatilegx - no luck. Doesn't matter which one I do it to, all it achieves is to remove the list style and indentation so you can't tell it's a list.

RossWal - I never got it. The only sticky mail I've gotten today is one from andreasfriedrich.