<ul> won't drop default margin

liunx

Guest
I am making the comments section of my site, and I have a ul in which the comments are displayed. However, even though I put margin: 0; on the ul, it doesn't get rid of the default margin, and therefor throws it off. Any ideas? Here's an example (scroll down past entry):

<!-- m --><a class="postlink" href="http://www.thenamesdan.com/index.php?b=10">http://www.thenamesdan.com/index.php?b=10</a><!-- m -->

Please help! I've spent the last 20 minutes trying to figure this out!

Thanks,
-DanI think what you're looking for is

ul#comments { margin:0; padding:0; }Ray's fix should work. Also I think you may have unintentionally given your comments <ul> a 50px left margin with this line:

#content ul {
color: #69c;
font-size:0.9em;
margin: 15px 50px 10px 50px;Originally posted by TomDenver
Ray's fix should work. Also I think you may have unintentionally given your comments <ul> a 50px left margin with this line:

#content ul {
color: #69c;
font-size:0.9em;
margin: 15px 50px 10px 50px; Actually, no, that was quite intentional. Having the margin attribute in the ul#comments should override that, though, not just add it on... and ray, I added the "ul" in, but it still doesn't work :confused:Originally posted by Daniel T
... and ray, I added the "ul" in, but it still doesn't work :confused:
Uh, no. You made quite a few changes that are probably interfering with each other. If you roll back to what you had before and just put in the rule I suggested then it will yank your comment box into the content div. The specificity of each selector determines whether it's applied and the changes you made to the other #comments-related selectors altered that relationship.I didn't mean that you put the line in unintentionally, rather that it's affecting your comments UL unintentionally.Originally posted by ray326
Uh, no. You made quite a few changes that are probably interfering with each other. If you roll back to what you had before and just put in the rule I suggested then it will yank your comment box into the content div. The specificity of each selector determines whether it's applied and the changes you made to the other #comments-related selectors altered that relationship. I don't see what changes I made that would make the positioning go all whack... and yes, I did make that change (ul#comments is't in the same place on the stylesheet as ul#com ments li, so maybe you didn't notice it) but it didn't help :confused:
 
Back
Top