Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-17-2007, 05:13 AM   #1
Retributi0n
So Fucking Banned
 
Join Date: Oct 2007
Posts: 393
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?
Retributi0n is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-17-2007, 06:28 AM   #2
teg0
Confirmed User
 
teg0's Avatar
 
Join Date: Jan 2006
Location: Gringo in Puerto Rico
Posts: 4,200
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.

Last edited by teg0; 12-17-2007 at 06:30 AM..
teg0 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.