i made a layout in css that worked fine in IE/mozilla. but my divs werent centering horizontally in safari, so looked for a different method.
i went with negative margins, which worked in all 3 browsers, BUT in mozilla I get a bunch of blank space to the right of the page, and a horizontal scrollbar that allows me to see all that space, even though technically everything fits in the window. presumably this is due to putting everything far to the right with left:50%, then centering it with margin-left:-400px.
any ideas on how to get mozilla to behave, and not "see" a bunch of extra room? or how to horizontally center a div inside another div (relative positioning) that works in all browsers. nothing ive tried works for me.
heres whats causing all the mischief:
[tt]
#container {
background: url(something.png) repeat-y 50% 0;
float:left;
width: 100%;
top: 0;
left: 0;
position: relative;
margin: 0;
text-align:center;
display:table;
}
#content {
left:50%;
margin-left:-400px;
margin-top:0px;
margin-right:auto;
margin-bottom:0px;
float:inherit;
display:table;
width: 800px;
top: 0;
position:relative;
text-align:center;
[/tt]
i went with negative margins, which worked in all 3 browsers, BUT in mozilla I get a bunch of blank space to the right of the page, and a horizontal scrollbar that allows me to see all that space, even though technically everything fits in the window. presumably this is due to putting everything far to the right with left:50%, then centering it with margin-left:-400px.
any ideas on how to get mozilla to behave, and not "see" a bunch of extra room? or how to horizontally center a div inside another div (relative positioning) that works in all browsers. nothing ive tried works for me.
heres whats causing all the mischief:
[tt]
#container {
background: url(something.png) repeat-y 50% 0;
float:left;
width: 100%;
top: 0;
left: 0;
position: relative;
margin: 0;
text-align:center;
display:table;
}
#content {
left:50%;
margin-left:-400px;
margin-top:0px;
margin-right:auto;
margin-bottom:0px;
float:inherit;
display:table;
width: 800px;
top: 0;
position:relative;
text-align:center;
[/tt]