css selectors - Select first list in table - CSS first-child? -
Maybe I am barking the wrong tree. I have a table with 6 columns, each with an order list. I want them all to have a limit besides the first list.
Originally though html
& lt; TR & gt; & Lt; TD & gt; & Lt; Ol & gt; & Lt; Li & gt; Hello & lt; / Li & gt; & Lt; / Ol & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Ol & gt; & Lt; Li & gt; Hello & lt; / Li & gt; & Lt; / Ol & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Ol & gt; & Lt; Li & gt; Hello & lt; / Li & gt; & Lt; / Ol & gt; & Lt; / TD & gt; & Lt; / TR & gt; I thought tr's first child works like tr: first-child ol {style}
The selector is CSS 2 and is not supported on IE6. If i6 is important then you first need to give a class to the child that you can choose instead but the correct syntax is:
tr td: first-child ol {...} When you do:
tr: first-hair ... You can actually & Lt; Tr & gt; Elements are selected First child. Also be aware of this:
tr: first-hair ... first selecting table rows
Comments
Post a Comment