Below is a website to illustrate the problem, but I have several such websites:
http://iwin123.com/
If you look below the menu (where the car is at the top) you'll see how the site transitions from the header to the "main content". In Firefox it is perfect. In Opera and IE it is off by 1px. The background image (which contains the borders and the "white section" is set to be centered via CSS. The header is set to be centered also. BUT, firefox and IE center it differently by 1px so either it is off in firefox or it is off in IE. Any idea of a way to fix this within CSS so that it is centered perfectly in both IE, Firefox and Opera?
Much thanks,
Chris
Centering in Firefox vs IE vs Opera
Moderator: General Moderators
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: Centering in Firefox vs IE vs Opera
style.css
Do not float, if necessary create another div element to float content inside of the centered element. Margins for block, text-align for inline elements.
Code: Select all
.center
{
margin-left: auto;
margin-right: auto;
text-align: center;
}