ie 8 show itself as ie7 [CSS if condtion]? - css

ie8 version on my computer , show itself as ie 7 when i use CSS IE CONDTION like
<!--[if IE 7]>
<script type="text/javascript">alert('hello iam ie 7 :P ');</script>
<![endif]-->
but when i try it on another computer with ie8 its work normally , its possible to have any
problem in my client website or this is ie problem ?
(IE 8.0.7600.16385 )

It may be problem with ur Internet Explorer Developer Tool so, use following to solve it,
press F12,
you can see the Browser Mode : IE8,
change it by clicking on it,
and select the appropriate menu,
Internet Explorer 7

Msie8 has an option to act as ie7 -- if you press F12 you will get a debug window, and in the upper right corner of that window you should see various options about which version to act as. You can switch to ie8 there.

can't tell for sure but I had an problem with ie8 some time ago that sounds pretty related to yours...
In my case I had to set the doctype of the html element in order to not run in compatibility mode where ie8 acts like it was ie7...
Just add something like that on the first line of your html and see if it works...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Related

Why is this CSS:before statement not working in IE 8, IE9?

Using a :before CSS to get an image/icon here (see round circle in image below), but in Internet explorer 8+ it is just not showing up.
This is the site:
http://www.websiteprofessioneel.nl
Image link below shows right element (it's the icon in the first post header) as circled on this screendump
http://tinypic.com/view.php?pic=xxd9f&s=5#.Ul_WajZRoWY
this is the CSS for that:
.welpen h2:before {
content: url("/wp-content/uploads/z-welpen-category-small.png") !important;
}
Anything missing perhaps? All other browsers work fine and as far as I know peudo CSS is totally supported in at least IE9, but it's not working in both IE8, 9 and up.
IE is Probably Using Quirks Mode
Internet Explorer can run in quirks or standards mode. The purpose of quirks mode was to make the new standards-compliant IEs (8+) able to read and process the code people had previously written for IE7-.
Likely Reason #1: invalid or absent DOCTYPE declaration
Try specifying this on the first line of your HTML document:
<!DOCTYPE html>
Make sure the <html> element is present. Even though HTML5 specification says it's not needed, older IEs (10 and older) tend to enter quirks mode when it's not specified.
Likely reason #2: site fails (X)HTML validation
If this is present, make sure the W3C validator throws no errors as these can also trigger Quirks Mode in IE. Yours has 15.
Actual reason was more unlikely: deliberately triggering Quirks Mode
After comments discussion, turns out I was right about the quirks mode, but wrong about the reason. Make sure you don't have any meta tags telling IE to run in quirks mode such as this:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
problem is because of something wrong in doctype, use <!DOCTYPE html> for html5 and to make it working on ie8 use
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
if you don't want html5 then use
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
this will fix the problem i think

wordpress website display wrong in IE

I have wordpress website, and the homepage of this website display incorrect in IE.
I'm developer too, so I know I have to put doctype in the header to force IE display in standard mode. But when I use developer tool in IE, it's display the doctype stay inside body tag.
Here is my website: http://kidscare.edu.vn/
and the screenshot:
http://imageshack.us/f/546/kidcareiebug.png/
The weird thing is another page is display correct. I don't understand why this error appear.
this site is working perfect in all IE expect ie6 quirks mode, the prob is you are viewing this site in quirks mode,
For changing this mode alt+7 or press f12 than change the document mode to the standard one.
Please change this mode and this will work fine see my ss.
its how site will look in IE7+.
you can check these questions also :
How do I get IE9 to use standards compliant mode when developing on
localhost?
why am I triggering quirks mode in IE8?
You have two starting HEAD tags and one closing HEAD tag. There should be one starting and one closing HEAD tag on your page. Try removing one.
Oeps, I typed HEAD but meant HTML. There is a typo in the conditional statement at the end of the first line:
<!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!-->
<html dir="ltr" lang="vi-VI" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns/fb#" >
<!--<![endif]-->

Browser Mode and Document Mode in IE

In IE9 Browser, a page is not displayed properly. Using developer toolbar I have found the following screenshot in which it displays
Browser Mode:IE9 Compat View
Document Mode : IE7 standards
If I force the browser to
Browser Mode : IE9
DOucment Mode : IE9 Standard
Then it display properly.
How can I show the page properly without forcing the browser to IE9 mode.
Ah... Internet Explorer didn't support HTML5 until IE9. Add this to the header:
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
Also, add an HTML5 reset style sheet like this one:
http://html5doctor.com/html-5-reset-stylesheet/
It looks different in the emulated version of IE7 because you wrote it in HTML5, and IE7 was developed before HTML5 was even an apple in the eye of the W3C.
Be careful using hacks such as the one prescribed in the answer above. It is better to understand each bit of code you add to your site.
It is also important to remember that every additional document, hell every keystroke you add, creates a greater load on the server and browser, which increases your load time.

IE 'about' says IE8 but css conditional only works for IE7, which IE version do I have?

I literally have to type in
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="css/ie8.css" />
<![endif]-->
to get my css hack to work for ie8. And yet when I click the 'abouts' tab in my IE browser, it clearly says IE8 version 8.0.6001. 18702.
I already reinstalled IE8 because I thought this issue was wierd but I still have to use the IE7 hack in order to get my IE8 only css to appear in my IE8 browser.
Is there something I can do to fix this? I have to talk to other developers and it is somewhat annoying not knowing exactly which IE version I have.
It looks like your IE8 is running in Compatibility View, which causes it to render pages like IE7, including reading IE7 conditional comments.
Look for the button in your toolbar that looks like a torn page, click on that, and it should disable it and return you to IE8 rendering mode.

CSS issues in IE8 XP but not in IE8 Vista or 7

I've implemented a landing page design for a campaign we are launching at work, and did testing on IE 7 on my XP machine at work and IE 8 on my 7 machine at home. These both worked and so I thought I had beaten IE, but as it turns out, different OS's IE render HTML differently even though they claim to be the same browser.
Anyone who has XP and IE8 will not see the site correctly at all.
I use two different CSS links. One for IE and one for !IE:
<!--[if IE]>
<link href="../images/content/pagebuilder/idop_2010/free-to-believe-IE.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if !IE]><!-->
<link href="../images/content/pagebuilder/idop_2010/free-to-believe.css" rel="stylesheet" type="text/css" />
<!--<![endif]-->
I had to use !IE because IE was still pulling CSS from the good stylesheet, and the IE sheet wouldn't update correctly (a different issue).
If I create IE specific CSS (IE7/IE8 vs just IE) could that fix the problem?
What's a good way to overcome an issue of Operating Systems + IE?
Edit
I installed IE 8 on my work computer and it has the same problem as all the other IE 8 computers. I have Internet Explorer developer tools, and I noticed that IE was running in "IE8 Standards Mode" When I switched it to "IE7 Standards Mode" the layout worked perfectly. I also noticed on my laptop with Windows 7, that the compatibility mode icon was activated. When I turned it off, I was able to duplicate my problem. So now I know for sure it's an IE8 issue in general, not necessarily an OS issue.
I've now created an IE8 specific stylesheet which I'm going to start overhauling to get it looking right.
Here is the site: http://members.opendoorsusa.org/site/PageServer?pagename=IDOP_2010
Anyone who wants to take a look at it and give me suggestions as far as CSS is concerned, I would appreciate it (I didn't do the design, just implementation, so no design critiques please)
Now that I know that this is the problem, I have another question. Why in the world does IE 8 display so different than IE7?!
The best way to overcome IE issues is to use conditional comments:
<!--[if IE 8]>
... link IE 8 specific stylesheet...
<![endif]-->
It seems like you already know about the conditionals so just try an IE8 specific stylesheet and see if it works.
Check this out. In theory, there shouldn't be any differences between different versions of Windows and the same web page on IE 8, but there may be exceptions with ActiveX and possibly the rendering of fonts.
Let me know if an IE8 specific stylesheet works for you.
Did you use the JQuery UI Themeroller? I just discovered a css bug as well that was only in XP, not in Vista. UI tabs and accordions were missing header text. I isolated the issue down to a custom generated theme made by the Jquery UI Themeroller. Replacing the custom theme with a prebuilt theme fixed the problem.

Resources