![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
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;"> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Sep 2005
Posts: 504
|
ok thanx
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Dec 2004
Location: Denver
Posts: 6,559
|
Try using margin to position it.
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |