Forum Moderators: not2easy
Not sure what all you need information wise, but I am having an issue. I have a nice 3 column css style I like a lot and I am using it on 2 of my websites. In I.E., everything looks great, just how it's supposed to, but in firefox, it's messed up pretty bad.
In I.E., the top logo is where it should be. The navigation bar is below the logo, and further down you can see the 3 columns. In firefox, the logo is where it should be, but the navigation bar is on the same line, as is some of the items that are supposed to be below both the logo and nav bar, which is screwing up the whole page.
The CSS style I am using was given to me years ago, and it's been perfect, but now with firefox being one of the top browsers, and the layout not working in firefox, I'm kind of stuck.
I can paste the part of my css here I think the problem is in, if someone could explain to me why it's not working (I believe it's something to do with "float" but as I said I'm new to css), I would really appreciate it.
Also, the problem, I believe, is in the #sitename and #siteimage ... just need to figure out how to make it all line up in Firefox... THANKS!
/***********************************************/
/* Layout Divs */
/***********************************************/
#masthead{
padding: 10px 0px 0px 0px;
border-bottom: 1px solid #cccccc;
width: 100%;
}
#navBar{
float: left;
width: 20%;
margin: 0px;
padding: 0px;
background-color: #eeeeee;
border-right: 1px solid #cccccc;
border-bottom: 1px solid #cccccc;
}
#headlines{
float:right;
width: 20%;
border-left: 1px solid #cccccc;
border-bottom: 1px solid #cccccc;
padding-right: 10px;
}
#content{
float: left;
width: 55%;
}
/***********************************************/
/* Components */
/***********************************************/
#siteName{
margin: 10;
padding: 0 0 0 2px;
float: center;
}
#siteName img{
float: left;
padding: 10px 10px 0px 0px;
}
/************* #globalNav styles **************/
#globalNav{
padding: 0px 0px 5px 10px;
border-bottom: 1px solid #CCC;
color: #cccccc;
}
#globalNav img{
display: block;
}
#globalNav a {
font-size: 90%;
padding: 0 4px 0 0;
}
[edited by: Jax2 at 3:18 pm (utc) on Sep. 22, 2008]
[edited by: engine at 3:28 pm (utc) on Sep. 22, 2008]
[edit reason] no specific sites, thanks [/edit]
IE is very buggy when it comes to CSS.
Still fixing it for firefox (and safari, opera, ...) will most likely throw IE off once again, so you need a substantially better solution:
While IE will make you loose a lot of time it's still faster to do it this way than any other way, esp. when looking at long term maintainability.
As for finding issues, could you add some html to go along with it, and/or describe what the difference is in a bit more detail?
But "float:center" isn't valid CSS.
[w3.org...] only allows left or right.
The CSS style I am using was given to me years ago..
in that case ;) THE most vital bit of information when comparing IE to others is:
What's Your Doctype [webmasterworld.com] - start that post, read encyclos one too (linked from that thread) and then try the first few troubleshooting steps in the guide pinned at the top of the forum
Ooops forgot my manners!
[edited by: SuzyUK at 7:19 pm (utc) on Sep. 28, 2008]