![]() |
Setting the distance between numbers and text in an ordered list.
Hi,
Quick question that's been bugging me. I want to set the distance between the numbers and the txt in an ordered list - and I can't for the life of me figure out how in CSS. Any ideas? The CSS is: ol { padding: 0; margin: 5px 0 10px 0; margin-left: 23px; color: #cc0000; } ol li { list-style-position: outside; margin: 0; } And the html is: <ol> <li><a href="#">The top tips text will go here</a></li> <li><a href="#">The top tips text will go here</a></li> <li><a href="#">The top tips text will go here</a></li> </ol> Richard Quick ------------- http://www.scaredoftheweb.com |
Re: Setting the distance between numbers and text in an orderedlist.
> From: richard_quick_uk@hotmail.com
> > The CSS is: > > ol { padding: 0; margin: 5px 0 10px 0; margin-left: 23px; color: #cc0000; } > > ol li { list-style-position: outside; margin: 0; } > > And the html is: > > <ol> <li><a href="#">The top tips text will go here</a></li> <li><a > href="#">The top tips text will go here</a></li> <li><a href="#">The top tips > text will go here</a></li> </ol> > I'm always forgetting how to do things. Here is one way, perhaps not the best, but it works as far as I can see for your list that consists of links: In the link css instructions put padding-left: 10px; or whatever px you want. If you don't want this generally for links then you will need to make the links for this a special (like a class). A:link { color: #000099; background: #fff; padding-left: 10px;} And, of course for hover and visited and active the same or different... dorayme |
Re: Setting the distance between numbers and text in an ordered list.
richard_quick_uk@hotmail.com wrote:
> I want to set the distance between the numbers and the txt in an > ordered list - and I can't for the life of me figure out how in CSS. ol li {padding-left: 23px;} Cheers Richard. |
Re: Setting the distance between numbers and text in an ordered list.
richard_quick_uk@hotmail.com wrote:
> Hi, > > Quick question that's been bugging me. > > I want to set the distance between the numbers and the txt in an > ordered list - and I can't for the life of me figure out how in CSS. > > Any ideas? > > The CSS is: > > ol { > padding: 0; > margin: 5px 0 10px 0; > margin-left: 23px; > color: #cc0000; > } > > ol li { > list-style-position: outside; > margin: 0; > } Add left padding to the list items: ol li { padding-left: 10px } -- Koren Web Design Services www.korenwebdesign.com (304) 453 2145 ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =---- |
| All times are GMT. The time now is 09:19 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.