Web Hosting Talk







View Full Version : <div> isnt staying on the fixed position. Works differently in IE and FireFox :S


latheesan
11-30-2005, 06:40 PM
Hello,

Take a look at this wierd wierd problem. I have a table 1000x1000. Thats it.

above the table, i have the following <div></div> code

<div style="position:absolute;top:200px;left:200px;width:40px;height:40x;text-align:center">
<a href="http://www.google.com" target="_blank" title="Click here to go to Google">
<img border="0" src="images/banners/black.gif" width="40" height="40"></a></div>

on Internet explorer, it looks like this:
http://img103.imageshack.us/img103/3366/ie8ts.jpg

on firefox, it looks like this:
http://img103.imageshack.us/img103/7701/firefox4sn.jpg

it should fit perfectly into the grid. but it isnt. What is causing the div to jump to differnt coordinate and how do you get it to stay in once place?

realwebsolution
11-30-2005, 07:46 PM
CSS validator says: Invalid number : height Unknown dimension : 40x

For more details please go to http://jigsaw.w3.org/css-validator/

Elliot A
11-30-2005, 11:25 PM
Looks like you have a typo.

Try height:40px; and see if that works

latheesan
12-01-2005, 07:50 PM
it didnt work, so what i did was, created a new page, created a table and put the div stuff on that new page. i called the new page "grid.php" and then on the index.php page, i included it using <iframe></iframe> and it is working accurately now.

It seems that, my header stuff was casing the div to jump. This iframe method is working. So, thanks for your help guys anyway :D.

Jeremy2
12-03-2005, 01:46 AM
Check out http://www.quirksmode.org - it has some great resources on CSS and browser incompatibilities.