![]() |
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. :helpme <DIV style="position: absolute; top:160px; left:15px; width:400px;"> |
That's because you use an absolute position. Try using:
position: relative; I advice you to read a free online tutorial on CSS positioning. |
ok thanx
|
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. |
Try using margin to position it.
|
All times are GMT -7. The time now is 10:00 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123