views:

1542

answers:

10

My website look and feel is not 100% the same in Internet Explorer 8 as it use to be with Internet Explorer 7. My site is created with VS 2005 and ASP.NET 2.0.

How can I fix this?
Is there a way to fix this?


Edit:

For those who want to see my website, it is Located Here - Some borders are diff. and the Email/Username text box in the Login Control in WAY at the top and actual Login Control width is less now.


Edit:

Those who view my site from now on will not see what I am talking about from now on since I made some changes to the site and fixed the problems.

+10  A: 

Short-term: put this in your HTML.

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

It's a horrid hack and Microsoft should be kicked in the nether regions for it, but it works.

Long-term: fix whatever's breaking to work in IE8. Without seeing the page itself we can't give you all that many suggestions on what specifically to focus on.

ceejayoz
How else would you propose MS finally transition to a browser that is standards compliant without breaking backwards compatibility?
JohnFx
This will work, but can cause browser-sniffing errors in some js frameworks. See my answer and http://blogs.msdn.com/ie/archive/2009/02/16/just-the-facts-recap-of-compatibility-view.aspx
Gabe Moothart
@JohnFx What use is a standards-compliant browser if all the jackasses who made sites that work in IE6-only never have to fix them?
ceejayoz
A: 

Internet Explorer 7 had some rendering flaws that have been corrected in Internet Explorer 8. It is impossible to answer this question without knowing more details. I am quite positive that this question is not related to c# or .net, but rather with html and css.

Please describe in detail some of the problems you're having, and I'm sure a lot of us will be able to help you out with them.

David Hedlund
+1  A: 

I just want to add some reference material, since the other answers are the same: use the IE7emulate tag.

Check the IE Blog about IE8 compatibility and the EmulateIE7 tag itself.

Jeff Meatball Yang
+3  A: 

The safest way to do this is by adding an HTTP header to your site:

X-UA-Compatible: IE=EmulateIE7

not with the meta tag as mentioned in most answers. Note that the http header is set on a per-site basis rather than a per-page basis.

This is because the meta tag does not alter the browser user-agent (which is obvious if you think about it - the user-agent has already been read by the time IE8 reaches the meta tag), which can cause browser sniffing to be incorrect. For example, the browser detection in YUI 2.7 incorrectly treats IE8 with the IE7 meta-tag as IE8, which causes problems. You can read more about the differences between the header and meta-tag approaches here

Gabe Moothart
MS recommends doing either but I'd also say to use the HTTP header; it can be enabled and disabled site-wide without doing a code role and potentially requires less files to be touched depending on how your site's code is organized.
Otis
I tend to expect any user not using a browser other than IE for development at this point in time to be someone who'd have a hard time adding a server-level header, hence the meta tag route.
ceejayoz
If they're preferring to develop in IE, chances are they're also using IIS and are familiar enough with the website configuration wizard to add an HTTP header.
Otis
+6  A: 

Long term answer: you may want to validate the XHTML/HTML output of your site by going to the W3 Validator website.

As of this writing, your default page has 36 errors and 3 warnings. The validator also provided hints and tips over how to solve the errors. If you're stuck, you can always ask for more information on specific issues here.

Adrian Godong
Thanks, will see what i can do about those errors!
Etienne
The reason for this answer is because IE8 on Standard rendering is comparable to all other major browser out there. (IE7 as well, as long as you stay out of quirks mode, which is the default).
Adrian Godong
+1  A: 

Long term strategy - when you are constructing your HTML/CSS, do so in Firefox and then adapt your CSS for IE and others. IE8 and FF are nearly identical in terms of standards compliancy at this point, so you could use IE8 as well (but still check in FF!).

Also, STOP SUPPORTING IE6!! IT NEEDS TO DIIEEEE

Jason
That would be nice to test it in Firefox first, but as i am building the site and i click RUN to see what it looks like it opens in IE. Is there a way i can change it so that it will open in FF??
Etienne
p.s Not talking about IE6, talking about IE7........
Etienne
If you change your default browser to FF, it should open when you use the run command
jrummell
you can also copy and paste whatever "test" url you're getting in IE and put it in FF... that's what I do when I develop in VS
Jason
+6  A: 

Doesn't look right in Chrome/Safari/Firefox either, so this really isn't an IE8 problem.

The problem is that you designed a site to look good in one outdated browser rather than developing to the standards and testing in multiple browsers.

In the future, design your site to look good in IE8, Firefox, Chrome, and Safari. Then, add specific work-arounds for IE6 and IE7, if your audience is still using those browsers.

If you can make something look right in three of the above browsers, you'll probably be fine when any of those browsers upgrades in the future (IE9, Firefox 4, etc.).

richardtallent
Thanks, will work on it!
Etienne
A: 

You could also in the future - build your apps in Silverligt 3 (RTM Tomarrow 7/10) and not worry about the browser at all :)

Jim Evans
Proprietary plugins to view entire websites that could be instead displayed in the industry standard manner? Uh, no.
ceejayoz
If there was a true standard that all browsers followed we would not have the massive amount of problems that we do with this. This was one suggestion - don't think it needs a dv - whatever.
Jim Evans
HTML is a standard that all browsers follow at least to a usable extent. Silverlight is an especially bad suggestion now that mobile phone browsers are finally usable. I think that's worthy of a dv.
ceejayoz
I know that you know there is a lot more than HTML involved here. CSS is usually the biggest culprit in these issues. And how many browsers impliment CSS in the same way - even though there is a "standard" for that. You want to dv it - fine. I still say it's one suggestion to get around "browser" issues.
Jim Evans
You can make a website that works in all major browsers without needing plugins with HTML and CSS. It may look slightly odd in a couple spots, or you may have to do a little CSS hackery to get it to look exactly the same, but you can do it without a plugin.Silverlight won't work without a plugin, period. That's rather more significant than "this element is two pixels out of place".
ceejayoz
A: 

My website look and feel is not 100% the same in Internet Explorer 8 as it use to be with Internet Explorer 7. My site is created with VS 2005 and ASP.NET 2.0.

How can I fix this? Is there a way to fix this?

Nothing new. Microsoft does this with every major release of IE. Abide by standards, and hope IE becomes standards compliant one day. Additional to standards, provide IE browser specific tweaks to ensure it is rendered correctly with that release.

waqasahmed