Dynadot โ€” .com Registration $8.99

Css boxes keep moving

Spaceship Spaceship
Watch

Maylin

Established Member
Impact
7
I'm trying to make my site look the same in Mozilla as well as IE.

I've tried z-index and it looks like the only way I can get anything to align is by absolute positioning. And it takes me forever to move my boxes, and when I create another box, then all the boxes move all over the place and I have to position everything all over again at a different position. :td:

Is it: (all boxes I try to move are divs)
.box
{
position: fixed;
left: 75px;
top 25px;
}

Is it this code that's used to z-index or can I use absolute positioning.

If moving the css boxes only works in a fixed position. Then I can't use fixed positioning. It messes up in both mozilla and ie.

The only thing I can think of to use is:

.box
{
position: absolute;
left: 75px!important;
top 25px!important;
left: 95px;
top 45px;
}

I found out the (!important) tag keeps the positioning I want in Mozilla, and the extra left and top is for IE positioning (to keep the same look as in Mozilla).

I haven't tried the (!important) code though, I know it would be time consuming. Is there ANY other way to position css div boxes that won't cause the other div boxes to move along with it, or worse completely move them all?

Thank You much is very appreciated. Thank you for your time. :tu:
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
If they are position: absolute; adding another DIV wouldn't do anything.

Fixed positioning doesn't mess up in FF and IE (eh.. IE doesn't support it, but it doesn't mess up).. you don't know how to use it.

z-index doesn't move anything.. just the layer order.
 
0
•••
if ur boxes are of fixed width then u can use relative positioning to one an another absolute is not going to solve the problem ..... u need to work on relative positioning.. as for the z-index it only stacks the order of layer .... z-index:0 will get it to the lowest layer and 99 to the topmost it only way of stacking... it doesnt effect ur positioning.

the !important will only work for firefox ... IE cannot read it so for IE and other browsers use the values as it is for example

.box{
left:25px;
top:35px;
}

this will be read by IE

but
html>body .box{
left:20;
top:30;
}

will be read by all other browser's except for IE...
 
0
•••
Fixed positioning doesn't mess up in FF and IE (eh.. IE doesn't support it, but it doesn't mess up).. you don't know how to use it.

z-index doesn't move anything.. just the layer order.
:tu: :td:

That's just it. I know that z-index is used for layers, and I figured if I gave my div boxes layers, it wouldn't affect the other boxes. Is it because I'm using the z-index in a css stylesheet? My other boxes tend to move anyway when I have them all in their own little layers.

When I make another div box to put on my site. All the rest of the div boxes scatter. Or if I'm trying to move one box down, the box below it moves down with it as well.

I asked for HELP not criticism :td:

and I don't get where the "but" comes in... :yell:

but
html>body .box{
left:20;
top:30;
}
 
0
•••
Nevermind, it's staying in place pretty good at the moment, I think it was because I didn't give all my div's a z-index. So far it's working pretty good. Sometimes the div boxes move with other boxes, but just by a little bit. So I don't have to do any dramatic coding to move the boxes back into place. Thank you guys, I really appreciate it. :tu:
Thank You,
Maylin

I still don't know where the but comes in. lol :yell:

but
html>body .box{
left:20;
top:30;
}
 
0
•••
Unstoppable Domains
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back