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 Mark Forums Read
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 05-20-2007, 04:00 AM   #1
timberlands
Confirmed User
 
Join Date: Sep 2005
Posts: 504
CSS positioning help?

Anyone know what the command is to position something on a page using only <div> tag and make it stay in its place when viewed at any resolution?

for example at 1024 rez it moves slightly out of place and overlaps other things but at higher rez its ok.

<DIV style="position: absolute; top:160px; left:15px; width:400px;">
timberlands is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-20-2007, 04:08 AM   #2
ssp
Confirmed User
 
Join Date: Jan 2005
Location: United Kingdom
Posts: 7,990
That's because you use an absolute position. Try using:

position: relative;

I advice you to read a free online tutorial on CSS positioning.
ssp is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-20-2007, 04:10 AM   #3
timberlands
Confirmed User
 
Join Date: Sep 2005
Posts: 504
ok thanx
timberlands is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-20-2007, 04:48 AM   #4
jayeff
Confirmed User
 
Join Date: May 2001
Posts: 2,944
Try this: http://www.webreference.com/html/tutorial18/

Absolute positioning can be valuable, but it is very tricky in most situations. For example, if your design is centered, you obviously cannot use absolute positioning in the horizontal, since the design will shift according to resolution (or rather, viewable browser width). The other big snag is that you cannot prevent Firefox (and other) users increasing font sizes, although there are ways to limit the chaos that can cause your layout.

Usually it is best to go with (the default) relative positioning and "graduate" to absolute positioning once you are stronger on CSS and only then, if you must.
jayeff is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-20-2007, 05:09 AM   #5
potter
Confirmed User
 
Industry Role:
Join Date: Dec 2004
Location: Denver
Posts: 6,559
Try using margin to position it.
__________________

potter 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
Thread Tools



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.