|
BobbyDouglas -> CSS Display (HR/H2) (10/15/2004 21:05:37)
|
I am trying to achieve the same result, that the code below shows in Mozilla, in IE. In Mozilla, the h2 and hr look basically on the same line, however in IE, there is a nasty gap. HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="middle">
<h2>Services Overview:</h2>
<hr class="titleline" />
</div>
</body>
</html> style.css CSS: * {
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
padding: 0;
margin: 0;
}
h2 {
font-size: 0.7em;
background: #660000;
color: #ffffff;
padding: 2px 0;
width: 150px;
text-align: center;
}
hr.titleline {
background-color: #660000;
color: #660000;
width: 95%;
text-align: left;
}
div#middle {
margin: 0 200px 10px 190px;
}
|
|
|
|