On Feb 11, 2010, at 12:39 PM, Skip Knox wrote:

> This is a small thing but I do like to understand why styles behave the way
> they do. Here is a sample page in question:
> http://boisestate.edu/webcenter/bestpractice/accessibility.shtml
> 
> Stylesheets are here:
> http://boisestate.edu/webcenter/styles/main.css
> http://boisestate.edu/webcenter/styles/bestpractice.css
> 
> The mystery has to do with line length in the navigation box on the right
> (not the left). Specifically, I have a width specified for the list items in
> that menu. I shouldn't have to, but if I remove the width statement, the
> lines word wrap about halfway across the box. 
> 

> 1. Can someone explain why, with no width on the li, the words wrap the way
> they do

because of this:
#content p, li {
        margin-right: 11em;
}

which select _all_ li element on the page

you probably wanted to say:
#content p, #content li { /* <--- note the change */
        margin-right: 11em;
}

When you then specify a width on those list-items it overrides that margin 
because the whole construction becomes over-constrained.

> 
> 2. Can someone offer a better solution to the problem than the one I'm
> employing?

see above ?

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to