Perhaps use an adjacent sibling selector:
http://www.w3.org/TR/CSS21/selector.html#adjacent-selectors

Although I am not sure how stable it is, these might help:
Meyer: http://meyerweb.com/eric/css/tests/css2/sec05-07.htm
Weakley: http://css.maxdesign.com.au/selectutorial/selectors_adjacent.htm

Warm regards,
Jason Robb
www.eleventy72.com

Nick Roper wrote:
I need to target the 1st item in a list. However, to make things complicated I can't assign a class or id to it. This is because of the way that the code is generated.

So, given the following example code:

<h3 class="someClass">Heading Text</h3>
<ul class="someOtherClass"> <li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ul>

Is there a way that I can target the <li> for Item 1 without it having a specific id or class assigned to it?

Thanks in anticipation.




*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to