Hello, all. I’m trying to do a test on taming lists with CSS, and I’ve run into a snag. I’m trying to get the word “and” to appear before the final list item by using [font=courier]ul.tame > li:last-child:before {content: ” and “;}[/font] This should hypothetically work; this example was modified from the [url=http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#last-child-pseudo]list of CSS3 selectors
The list is just a normal list of links, with the class name “tame”, with a paragraph (class=”ul-int”; <ul> intro) before it. The CSS is as follows:
[code] ul.tame, p.ul-int {margin: 0; list-style: none; display: inline; padding: 0; }
ul.tame li {display: inline;}
ul.tame li:after {content: “, “;}
[b]ul.tame > li:last-child:before {content: ” and”;}
ul.tame > li:last-child:after {content: “.”;}[/b]