List Items and Background Images
04 Jan 2007
Posted by Jake Rutter as CSS/Web Standards, General, Web
Today I learned a new trick, instead of using the list-style-image to declare your image in a list like so:ul {list-style-image:url("bullet.gif");} This method is limited in placing your image, because you can\’t move around where it appears. It will appear in place of the bullet and thats it. If you use background inside of the actual li declaration, then instead you can use the padding and margins to place your custom bullet point accordingly.Setup like this:ul {list-style-type:none;}ul li {margin:0px;padding:5px 0px 0px 10px;background: url (bullet.gif);}
Category CSS/Web Standards, General, Web
You can follow any responses to this entry through the RSS 2.0 feed.





No Responses to “List Items and Background Images”