Welcome to WebmasterWorld Guest from 54.158.36.59

Forum Moderators: not2easy

Message Too Old, No Replies

Remove space from a list

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

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

10+ Year Member



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>

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

WebmasterWorld Senior Member 10+ Year Member



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

Should work for you.

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

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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;
}

 

Featured Threads

Hot Threads This Week

Hot Threads This Month