[thelist] Image margin error on CSS centred box

Liam Delahunty liam at megaproducts.co.uk
Fri Jul 9 17:27:25 CDT 2004

On http://www.noogle.co.uk/index.php I've hacked the image placement by 
adding a rule to move the image 3px left as if I don't, on IE 5.5, I get 
a little bit of white space to the left of the image.

Any ideas why?

<style type="text/css">
body {
background-color: #900;
margin:0px 0px 0px 0px;
padding:0px 0px 0px 0px;
font-size: 76%;
font-family: verdana, arial, helvetica, sans-serif;
top: 50%;
width: 800px;
height: 424px;
margin-left: -400px;
margin-top: -200px;
padding: 0px;
background-color: #fff;
text-align: center;
img {
border: none;
padding: 0px;
margin: 0px; <<< changed this to -3px on index.php to get the image to 
cover the gap.
.h2 {
font-size: 1.6em;
margin: 0px;
padding: 0px;
line-height: 1em;


<div class="centrebox">
<img src="/images/ULU.jpg" align=left border=0 width=400 height=424 
alt="Redstar at ULU">
<p class=h2>Redstar and Inner Voice</p>
... more ...

Kind regards, Liam Delahunty, Mega Products Ltd
12 Bury Place, London WC1A 2JL Fax: +44(0)871 224 7891
http://www.megaproducts.co.uk/ Internet Design & Development

More information about the thelist mailing list