How to match CSS LI and set widths?

You don't need so many classes, however you could match the li s with.

You don't need so many classes, however you could match the lis with: ul. Listing_wrap li { width:33%; }.

Yes I'm aware of this, but the above sample is taken out of a bigger picture, so the classes are more defined. – Putimir Dec 9 at 9:34 As pointed by others, 3col is not a valid name for a class. However if you can't rewrite a CSS rule, try using!

Important after the rule – Simone Vittori Dec 9 at 9:56.

The simpler your selectors are, the better. So this would be enough: li { width: some other with for not 3 columns style} .3col > li { width:33% } also 3col is not a valid classname.

Class identifiers should not start with a digit. For the test, set "col3" instead of "3col" and you will see it work!

Thanks, I just edited the layout as it had a width definition under DIV. Listing_wrap UL LI, and this class is getting matched, so the LIs were infact the correct width. Can you take a look again, thanks... – Putimir Dec 9 at 9:41 Let me point out again, that the above example is taken out of bigger picture, and I would like to set widths of the LI elements via different UL classes.... – Putimir Dec 9 at 9:43 With your edited code, I can reproduce it.

I edited my answer. I currently cannot find a source on W3C stating that "class" attribute should not start with a digit. It is clear for "id" and "name" on w3.Org/TR/html4/types.

Html#type-cdata – Wis Dec 9 at 9:54 GREAT MAN! ;) Thats it! – Putimir Dec 9 at 9:55.

Ul.3col > li will match any li that is directly a sibling of a ul with the class .3col However, if you user a % width you should make sure the element actually has a parent to which it can relate for the actual px the % represents, else the results can be unreliable.

Or use table-cells... then you don't have to worry about width's: . Container { display: table; } . Container ul { display: table-row; } .

Container ul li { display: table-cell; }.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions