Li background

  • Thread starter Thread starter Paul C
  • Start date Start date
P

Paul C

hi
Is there a way of changing one list item using CSS? I want the top item to
have rounded corners so I thought I could insert an image background just
for that li item.
Thanks
Paul M
 
Sure. You would set up a style and then apply that style just to that list
item. For example:

#list_item li
{
background: url(images/mypic.gif) no-repeat left top;
margin: 0;
padding: 0;
}

Then

<li id="list_item">

or you could put a DIV tag around it. Ex:

<div id="list_item">
<li>xxx</li>
</div>
 
Thanks David
Best wishes
Paul M

David Berry said:
Sure. You would set up a style and then apply that style just to that
list item. For example:

#list_item li
{
background: url(images/mypic.gif) no-repeat left top;
margin: 0;
padding: 0;
}

Then

<li id="list_item">

or you could put a DIV tag around it. Ex:

<div id="list_item">
<li>xxx</li>
</div>
 
Back
Top