padding/margin not working :(

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
aravona
Forum Contributor
Posts: 347
Joined: Sat Jun 13, 2009 3:59 pm
Location: England

padding/margin not working :(

Post by aravona »

Ok! So, Padding-top 0px and Margin-top 0px ... neither want to se this div to the top :(

Basically getting an extra line on my code and I cannot see where its from. So I put a table around the whole thing, and bordered it. The border showed me that the issue is with the bottom set of divs (in the bottom div)

heres the site which as you can see on IE and FF sits the background of the bottom cell too low.

The CSS:
[text]
#contentwho {
padding-top:0px;
margin-top:0px;
margin-left:auto;
margin-right:auto;
width:994px;
background:url(images/whobg.png) repeat-y #F0F0F0 top;
}
.storycontentwho{
padding-top:0px;
margin-top:0px;
width:927px;
height:408px;
}[/text]

The Html:

[text]<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td>
<div id="who"><?php the_title(); ?></div>
</td>
</tr>
<tr>
<td>
<div class="whowhite">&nbsp;</div>
<div class="whowhite">&nbsp;</div>
</td>
</tr>
<tr>
<td valign="top">
<div id="contentwho">
<div class="storycontentwho">
<?php the_content(__('(more...)')); ?>
</div>
</div>
</td>
</tr>
</table>[/text]

To me, that should all be sitting correctly? And advice would be awesome :)

Thanks!

Aravona
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: padding/margin not working :(

Post by kaszu »

Problem is P margin, add

Code: Select all

#contentwho {
    overflow: hidden;
}
or remove margin from P
aravona
Forum Contributor
Posts: 347
Joined: Sat Jun 13, 2009 3:59 pm
Location: England

Re: padding/margin not working :(

Post by aravona »

Thanks sorted it :)
Post Reply