Joseph Witchard
12-08-2009, 01:56 AM
<html>
<head>
<title>TESTING</title>
<style type="text/css">
body { color: #FFFFFF; font-size: 8pt; }
#houses { width: 150px; height: 400px; text-align: center; }
#g { width: 75px; height: 100px; float: left; background-image: url(gryffindorcopy.jpg); }
#h { width: 75px; height: 100px; float: right; background-image: url(hufflepuffcopy.jpg); }
#r { width: 75px; height: 100px; float: left; background-image: url(ravenclawcopy.jpg); }
#s { width: 75px; height: 100px; float: right; background-image: url(slytherincopy.jpg); }
p.houseText { position: relative; top: 71px; }
<!--[if IE 8]>
p.houseText { position: relative; top: 90px; }
<![endif]-->
</style>
</head>
<body>
<div id="houses">
<div id="g">
<p class="houseText">100</p>
</div>
<div id="h">
<p class="houseText">100</p>
</div>
<br/>
<div id="r">
<p class="houseText">100</p>
</div>
<div id="s">
<p class="houseText">100</p>
</div>
</div>
</body>
</html>
The background images are 75x100 pixels, as are their container divs. In Firefox and Chrome, the text is right below the hourglass, like I want it to be. In Opera and IE8, however, the text is positioned a little bit on top of the hourglasses. I don't know what to do about Opera, but I would have thought that the conditional comments would have fixed Internet Explorer. Maybe because it's IE 64 bit? I don't know.
Does anyone have any ideas?
<head>
<title>TESTING</title>
<style type="text/css">
body { color: #FFFFFF; font-size: 8pt; }
#houses { width: 150px; height: 400px; text-align: center; }
#g { width: 75px; height: 100px; float: left; background-image: url(gryffindorcopy.jpg); }
#h { width: 75px; height: 100px; float: right; background-image: url(hufflepuffcopy.jpg); }
#r { width: 75px; height: 100px; float: left; background-image: url(ravenclawcopy.jpg); }
#s { width: 75px; height: 100px; float: right; background-image: url(slytherincopy.jpg); }
p.houseText { position: relative; top: 71px; }
<!--[if IE 8]>
p.houseText { position: relative; top: 90px; }
<![endif]-->
</style>
</head>
<body>
<div id="houses">
<div id="g">
<p class="houseText">100</p>
</div>
<div id="h">
<p class="houseText">100</p>
</div>
<br/>
<div id="r">
<p class="houseText">100</p>
</div>
<div id="s">
<p class="houseText">100</p>
</div>
</div>
</body>
</html>
The background images are 75x100 pixels, as are their container divs. In Firefox and Chrome, the text is right below the hourglass, like I want it to be. In Opera and IE8, however, the text is positioned a little bit on top of the hourglasses. I don't know what to do about Opera, but I would have thought that the conditional comments would have fixed Internet Explorer. Maybe because it's IE 64 bit? I don't know.
Does anyone have any ideas?