GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Who's good with CSS layout positioning - help (https://gfy.com/showthread.php?t=792760)

Retributi0n 12-17-2007 05:13 AM

Who's good with CSS layout positioning - help
 
<div style="position:absolute;left:65px;top:60px;height :400px;">

i'am using the above code to position an image on a page... it's always out of position when you look at it in different resolutions. for Example.. in 1024x768 I can line it up ok.. then if you look at the page in a higher resolution it's all off position...

wtf? :Oh crap

teg0 12-17-2007 06:28 AM

Its because you probably don't have a "container" for it. You need to have that code inside some other div tag that has something like

Code:

position: relative;
width: 500px;
height: 600px;

The position relative is important and so is having a set width. The reason it is looking different at different resolutions is because if you don't have a container around that code it is positioning itself using the top left corner of the browser window.

so in the end you'll have code thats like this (if your are putting all yoru css code inline:

Code:

<div style="position:relative;width:600px;height:600px;">
<div style="position:absolute;left:65px;top:60px;height :400px;">
</div>
</div>

Hope that makes sense, but I'm 100&#37; sure thats what your problem is. Everyone learning CSS runs into that once.


All times are GMT -7. The time now is 09:46 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123