Help - Search - Members - Calendar
Full Version: keeping div boxes in the same place
Forums > Resource Center > Webmasters' Corner > Webmasters' Corner Resolved Topics
rewop
all my codes after a some amount of time alter so that all the boxes move up, to the left; or out of position. also it tends to look different on other people's computers.

could it be that i am defining positions with percents?

here's an example of one code

CODE
.div1 {
background-color:black; color:white;
border:2px solid; border-color:silver;
width:789px; height:1000px; overflow:inherit;
position:absolute; z-index:2; left:50%; top:0%;
margin-left:-394px; margin-top:150px; text-align:center;
visibility:visible;}
marquee { z-index:8; }
SinfullySweet
Thats odd. Your percentages are set to 50% It should look and fit the same on all screen resolutions. I dont think any type of code could mess with any type of coding that would make the div layer spontaneously move somewhere else.

Could this be a glitch? I see nothing wrong with the coding.
rewop
yea thats is the funny thing...its all right but..somehow it tends to move everynow and then.

do you think im better coding from scratch again in hope that it will fix the glitch?
SinfullySweet
Hm.. If this continues to happen, I recommend it thumbsup.gif
rewop
also everymovement seems to be centered around the higher of the divs
example

.friends {
blablblblhalbhlbah
blahblhablhblahblh
l;abhlahblahblhblh
blhablkhh

.comments {
lkdalksjdlskajlkjlvkj
asdlkjasldkjaslkdj;al
slkdja;lskjdklsajd;lj
sdsdasdsd

if i correct the 'friends' div then the other one goes back to its spot too. another thing that kinda puzzled me..
lovescream
hmm.. im not sure o_o that happens with my divs, but some of them never move at all. Umm.. well, you have a margin-top, a top, and then a margin-left, and a left, all in one code..? lol
rewop
oh lol sorry..i just made something up as i went along..
i think i forgot i put the margin-left and 'top'. its just a habit..i usually use that in a code but i've been trying percents and therein lies my problem.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.