Here is my HTML code:
<html>
<body id="body">
<div id="content">
<div id="head1">
<h3 id="cpsir">CPSIR-CM</h3>
</div>
</div>
</html>
This is the CSS code:
#body{
background:#0F657D;
}
#content{
width:1000px;
height:740px;
background:#E2E2E2;
margin-left:auto;
margin-right:auto;
}
#head1{
width:auto;
height:60px;
background:#626262;
margin-top:-10px;
}
#cpsir{
font-family:Verdana, Helvetica, sans-serif; font-size:24px;
color:#F4F4F4;
padding-top:10px;
I am attempting to align the head
div tag to the top of the body. However, it doesn't fit perfectly so I have used a negative pixel value for margin-top. This adjustment works as expected in some browsers like Torch, but not in others like Internet Explorer. What can be done to achieve consistent results across different browsers?