PDA

View Full Version : Position: Absolute Problems.



Boonzeet
03-11-2007, 01:38 PM
How do I stop the Image moving with different resolutions and different browsers?



<div style="position: absolute; top: 178px; left: 243px; z-index: 1;" />

<A

onMouseOver = "rollover('smr')"
onMouseOut = "rollout('smr')"
><IMG
SRC="../Board3/1.gif"
NAME="smr"
ALT="" BORDER=0
></A>
<SCRIPT TYPE="text/javascript">
<!--
setrollover("../Board3/2.Gif");
//-->
</SCRIPT>
</div>


Yes, I need the rollover to work. Im cutting up a habbo room to make it into a website.

Anyone know how?

iTechnical
03-11-2007, 01:47 PM
Hmmmm..
You need to define the script more

CBA typing it out ^_^

Boonzeet
03-11-2007, 02:16 PM
Comon :P

Ill rep you if you do :D

I thought about:


<div style="
position: absolute; top: 178px; left: 243px; z-index: 1; text-indent: -500px;" />

<A

onMouseOver = "rollover('smr')"
onMouseOut = "rollout('smr')"
><IMG
SRC="../Board3/1.gif"
NAME="smr"
ALT="" BORDER=0
></A>
<SCRIPT TYPE="text/javascript">
<!--
setrollover("../Board3/2.Gif");
//-->
</SCRIPT>
</div>

[Oli]
03-11-2007, 02:54 PM
I never use absolute.

Absolute is (imo) only fine for layouts that are left-aligned (not centered) and are suppoced to stay ...px from the top-&-left sides.

If you want your layout centered & want your box/div to move along with the design instead of staying ...px from top & left sides when you change resolution/browser size, please use position: relative; ;)

Boonzeet
03-11-2007, 03:26 PM
So how would I write the code?

Want to hide these adverts? Register an account for free!