homepage Welcome to WebmasterWorld Guest from 54.211.219.178
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Remove space from a list
How do you remove the space when you take the bullets out of a list?
matthewamzn




msg:3913565
 2:32 pm on May 14, 2009 (gmt 0)

How do you remove the space when you take the bullets out of a list? I can get it to work with a negative margin, but is there a better way?

#leftcolumn ul {
list-style-type: none;
}

#leftcolumn li {
margin-left: -20px;
}

<div id="leftcolumn">
<ul>
<li>example</li>
<li>example</li>
<li>example</li>
<li>example</li>
</ul>
</div>

 

4css




msg:3913598
 3:24 pm on May 14, 2009 (gmt 0)

Setting your
ul {
list-style-type: none;
margin: 0px;
padding: 0px; }

Should work for you.

DrDoc




msg:3913624
 3:48 pm on May 14, 2009 (gmt 0)

In fact, set the margin and padding to zero for your list item as well.

ul, li {
list-style-type: none;
margin: 0px;
padding: 0px;
}

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved