html - Space between DIV and Top -
i have space between top of website , top div, have set both have no margins still has space. can tell me doing wrong here? thought setting margins 0 fix apparently not.
html
<div class="toppanel"> <p>title</p> </div>
css
.toppanel { background-color:#ffffff; width:100%; height:auto; font-family: copperplate, "copperplate gothic light", fantasy; color:#000000; font-weight:100; font-size:36px; text-align:center; margin: 0; padding: 0; } body { background-color:#e3e3e3; margin: 0; padding: 0; }
sample image
the issue margin on p
tag pushing div down.
the possible solutions are:
1) change p
style have 0 top margin
or
2) add padding-top: 1px
div
or
3) add border-top
div.
if p
tag has margin, nothing "push off of" within div, entire div move down accomodate margin-top of p
tag.
Comments
Post a Comment