DIV alignment probs in IE

Associate
Joined
18 Oct 2002
Posts
662
Location
UK
Chaps,

I'm having probs with the good old DIV alignment difference between IE and Firefox. If I align the DIV with IE it displays correctly but then in Firefox it's out by upto 35px at the bottom. If I set the DIV to align with Firefox it displays ok but check on IE and again it's out by some 35px.

The DIV displays a load of images which have to be perfectly aligned with the main html of the page so I need precise locations of the images. I've used a table to do this but perhaps this isn't the best way?

Here's some of the html (it's actually about 10 times the length of this but not worth posting the lot).

<div id="previewimages" style="position:absolute; left:26px; top:607px; width:104px; border:0; z-index:1; visibility:visible; height: 4339px">
<table width="113px" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="31px">
<div align="center"><img src="preview_images/sff.gif" width="40" height="34"></div>
</td>
</tr>
<tr>
<td height="43px"></td>
</tr>
<tr>
<td height="30px">
<div align="center"><img src="preview_images/soundproofing.gif" width="48" height="29"></div>
</td>.......


.....</table>
</div>

I'm a newbie when it comes to DIV's so no doubt I'm done something silly. Any ideas?
 
roboffer said:
Recode without the table, then post a link so we can see what your problem is, then it will be corrected in no time :)

Ok so how would I arrange the images without tables? As mentioned.. newbie alert :D
 
Code:
<div id="previewimages" style="position:absolute; left:26px; top:607px; width:104px; border:0; z-index:1; visibility:visible; height: 4339px">

Why don't you just put all those style values in your stylesheet under your
"#previewimages" selector?
 
iCraig said:
Code:
<div id="previewimages" style="position:absolute; left:26px; top:607px; width:104px; border:0; z-index:1; visibility:visible; height: 4339px">

Why don't you just put all those style values in your stylesheet under your
"#previewimages" selector?

Chaps, thanks for your input and advice. I've managed to do this without having to use a DIV and have got the images aligned fine. Ta :)
 
Back
Top Bottom