Browser differences

I’m just getting started in web design and have a problem with the style sheets on IE. I was able to design the site and test it on a Mac using Safari 5.0.6 and Firefox 3.6.28 browsers. When the site looked complete, I tested it on my Windows laptop using IE9 and the alignment wasn’t even in the ballpark. It appeared that the positioning wasn’t observed or the javascript code executed. Is it necessary to create a javascript routine to determine the browser and create an entire set of styles just for IE? Can anyone recommend a good resource that explains the CSS differences between the browsers?

Hi cjbergin. Welcome to the forums. :slight_smile:

Is it necessary to create a javascript routine to determine the browser and create an entire set of styles just for IE?

Absolutely not! IE9 should render your styles just fine, so it’s highly likely there is an error in your CSS. Feel free to post a link, or at least run your site through the HTML and CSS validators.

the URL is nexusdesign.us. If you could view the source code, perhaps you could point me in the right direction.

OK, yeah, quite a few coding problems there. For a start, your page needs to have a doctype at the top. Otherwise, browsers go into “quirks mode”. Here is a list of the HTML problems:

See if you can address those first (ad feel free to ask for help if you don’t understand what to do).

wow, what a rookie mistake. Good catch. All set for now. What other issues did you see?

nevermind, I’m going through it now.

You can always use CSS hacks to quick fix your CSS.
Eg:

.div {
height: 10px;
}
.div {
*height: 12px; /* IE6+7, doesn’t work in IE 8/9 as IE7 /
}
.div {
_height: 14px; /
IE6 /
}
.div {
height: 10px \0/; /
IE8+9 /
}
@media all and (min-width:0) {
.div { height: 10px; \0/; } /
IE9-IE10pp4 */
}
Before \0/ the space is compulsory, otherwise yu will also match Opera.

Best saved an an absolute last resort. :slight_smile:

Thanks guys, Ralph was able to point out a glaring error and now I think it is fixed. Cosmo, you sound like a CSS guru. I’m in Massachusetts as well.