Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

heading different positions between browsers

Status
Not open for further replies.

filipel

Programmer
Aug 13, 2007
42
PT
Why the header appears in different positions between explorer and mozilla???


<div id="header">
<h1>Bidoeira</h1>
</div>

css:

#header {
width:90%;
height:70px;
background-color:#0066CC;
padding:10px;
}

#header h1{
z-index:1;
font-size:45px;
font-family:Georgia, "Times New Roman", Times, sans-serif;
}
 
There are different default padding and margins among the browsers.
Try adding:
Code:
[b]body, * { 
padding 0;
margin: 0;
}[/b]
#header {
  width:90%;
  height:70px;
  background-color:#0066CC;
  padding:10px;
}

#header h1{
   z-index:1;
   font-size:45px;
   font-family:Georgia, "Times New Roman", Times, sans-serif;
}
to see if that's a little closer to what you expected.



Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
It means apply to body and (denoted by comma) everything (denoted by asterisk). Actually, you could've just used the * to set it for every element.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top