Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bottom of DIV truncated in IE, not centered in FireFox

Status
Not open for further replies.

databarn

Programmer
Sep 19, 1998
202
US
Folk,
Have a problem with DIV(s).
div.mainout {
text-align: center;
background-color: #DDFFFF;
border: thin;
border-color: #0000FF;
border-style: dashed;
cursor: default;
/* float: left;*/
margin: 0em;
padding: 0em 0em 1em 0em;
width: 100%;
}
div.main {
text-align: center;
background-image: url(img/bar_vert.gif);
background-repeat: repeat-y;
/* background-color: #DDFFFF;*/
border-style: dashed;
border: medium double;
border-color: #0000FF;
cursor: default;
float: inherit;
margin: 0em;
padding: 0em;
width: 768px;
min-height: 600px;
}
main is contained within mainout, and contains a number of other DIV and SPAN elements. At times, IE does not display either mainout or main entirely, truncating them at about 3/4 of the first fold. Since part of the navigation runs down the left side of main, I lose some nav capability, and significant portions of the content within main.
The 2nd problem - sorry for the mix, but I don't know if it's a related issue or not - is that while main is centered in IE, it aligns to the left in FireFox.

In either case, it doesn't seem to matter what Win OS is in use on the client machine, nor what version of IE is the user agent - however, have not checked below v5.0. Further clouding the issue is that IE's truncation, if that is what it is, is not consistent - it doesn't happen all, or even most, of the time . . . just often enough to drive me up the nearest wall {sigh /}.

I've searched as much as I could on both FireFox and IE issues, but have not been able to find this particular one. Of course, I'm prolly using the wrong search terms {grin /}.

Anybody have a clue as to what is happening, why it is happening?
 
As for the FF centering issue... divs are not text, and using text-align does not align them. As per standards, you should use margin: 0 auto; on the element you want to have horizontally centered.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top