Forum Moderators: not2easy

Message Too Old, No Replies

Bullet list extending into padding of div

         

newdude

1:13 pm on Jul 22, 2009 (gmt 0)

10+ Year Member



On the Clients page of my site: <snip>, how come the bullets to the list items are within the 25px padding of my content container and not lined up horizontally with all the other content on the left side of that page?

Thanks in advance!

}
#content {
margin: 0px;
padding: 25px;
float: left;
height: auto;
min-height: 400;
width: 800px;
background-color: #FFFFFF;
text-align: justify;
}
#content ul {
margin: 0px;
padding: 0px;
}
#content li {
font-family: Arial, Helvetica, sans-serif;
}

[edited by: swa66 at 9:13 pm (utc) on July 22, 2009]
[edit reason] No links, please see ToS and Forum Charter [/edit]

rocknbil

2:18 pm on Jul 22, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



try

#content ul, #content li {
margin: 0;
padding: 0;
font-family: Arial, Helvetica, sans-serif;
}

newdude

6:28 pm on Jul 22, 2009 (gmt 0)

10+ Year Member



thanks but that did not work. any other suggestions?

jameshopkins

7:34 pm on Jul 22, 2009 (gmt 0)

10+ Year Member



This is happening since you've reset the padding applied to the UL element, and that marker boxes (the bullet created by list-items) are by default, drawn outside of the block box (LI element).

Add 'list-style-position:inside' to '#content li', which will fix this problem.

newdude

8:19 pm on Jul 22, 2009 (gmt 0)

10+ Year Member



that worked. thank you!