conditional-comments Questions

5

Solved

I am trying to make a website look better in IE, so i decided to use conditional comments. So I used this conditional comment to link to the stylesheet. <!--[if IE]> <link rel="styleshee...
Melissa asked 21/12, 2012 at 4:50

25

Solved

How do I target only Internet Explorer 10 for certain situations like Internet Explorer-specific CSS or Internet Explorer-specific JavaScript code? I tried this, but it doesn't work: <!--[if I...
Illuminati asked 28/3, 2012 at 2:21

2

Solved

What is the meaning of lt in the following script? <!--[if lt IE 9]> <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/r29/html5.min.js"> </script> <![endif]-->
Fullmouthed asked 2/1, 2017 at 16:41

7

Solved

It's possible to load a script only in IE with conditional comments <!--[if lte IE 7]> <script type="text/javascript" src="somescript.js"></script> <![endif]--> but what...
Peen asked 31/3, 2011 at 19:23

6

Solved

I know that you can use an IE conditional comment inside HTML: <!--[if IE]> <link href="ieOnlyStylesheet.css" /> <![endif]--> But what if I want to target only IE in a styles...
Madras asked 28/7, 2012 at 18:41

15

I'm having trouble getting <!--[if !IE]> to work. I'm wondering if it is because I have this in my document <!doctype html> <!--[if lt IE 7]> <html class="ie6 oldie"...
Jerboa asked 9/12, 2012 at 7:38

2

Solved

I'm using Vue to produce some html template, I need to include the html conditional comments as per code below. var productTemplate = new Vue({ el: '#myApp' }); <script src="https://unp...
Traveller asked 22/11, 2017 at 4:12

11

Solved

For Internet Explorer 8 (IE8) I'd like to use the following CSS: color : green; I would like to apply a hack which only affects IE8, not to IE9, IE6 and 7.
Marcelenemarcelia asked 15/6, 2010 at 6:55

3

Solved

This is my source code file in Eclipse: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w...
Presumption asked 26/12, 2012 at 23:37

1

Solved

How do you use conditional comments to target Internet Explorer only Certain IE versions Certain IE versions and all other browsers No IE, just other browsers in a way that validates? (validato...
Towandatoward asked 14/10, 2015 at 18:24

15

Solved

In order to detect IE most Javascript libaries do all sort of tricks. jQuery seem to add a temporary object into your pages's DOM to detect some features, YUI2 does regex on the user agent ...

2

Solved

I want to load a css file only for IE11 browser. How can I do it? I understand that I can use conditional comments to load stylesheet's for IE <=9. But not for IE 10 & 11. I could G...
Traveled asked 30/12, 2014 at 10:12

4

I'm trying to link to IE10 with an external style sheet but its not working properly. whats happening is IE10 is using the same style sheet as the other browsers. i have attached different styleshe...
Immunology asked 29/1, 2013 at 14:53

3

Solved

I am trying to use MVC4's new "bundling and minification". For IE conditional comments, I'm still doing it the old way: <!--[if lt IE 9]><link href=.../><![endif]--> or <!--[i...

8

Solved

I'm using the new Internet Explorer 11 developer tools to switch the document mode to "8", but conditional comments are still ignored, that is, they are not properly parsed and behave lik...

4

Solved

When researching JavaScript conditional comments for IE, I stumbled upon @cc_on. This seems to work. However, the wikipedia entry on conditional comments provides the following code for more robust...

3

Solved

I want to create conditional comments in XSLT. But when I use this: <!-- [If IE7] [endif] --> in an <xsl:comment>, XSLT removes it from the output when it is rendered. Is there any...
Fricandeau asked 2/5, 2009 at 5:57

2

Solved

I have the following in my head tag: <link rel="stylesheet" href="Scripts/styleMain.css" media="all" type="text/css" /> <![if gte IE 9]><!--> <link rel="stylesheet" href="Scri...
Hospice asked 5/7, 2013 at 14:0

5

Solved

I came across a weird thing in IE9 trying to get a background gradient to display. Basically I'm applying multiple classes to a container object. <div class="gradient corners"></div> ...
Suberin asked 25/5, 2011 at 20:6

2

Solved

We upgraded our JSF to latest version 2.1. previously we were in JSF2.0.4. Our xhtml pages has Targeting IE Using Conditional Comments tag,which were not rendered as text. But with new JSF2.1.7 th...
Actinology asked 17/4, 2012 at 16:36

4

Solved

I've got a script I want to run in every browser except versions of IE below 9, obviously, this conditional statements works for IE: <!--[if gt IE 8]> JavaScript stuff here <![endif]--&g...
Shavian asked 14/8, 2012 at 8:55

3

How do I add an IE7-and-lower-only stylesheet to an XSL page? I tried adding it into the template for header information like so: <xsl:template name="header"> <!--[if lte IE 7]> <li...
Leveret asked 3/8, 2012 at 20:28

3

I thought I remembered reading somewhere that IE9 would not be supporting them, but now after searching I can't find any indication that this is true. Is anyone aware of a definitive statement, ei...

1

Solved

I've noticed that in JSF 2.1.* my IE conditional comments are no longer working. Various characters are being replaced by HTML entities & invalidating the comment syntax. BalusC has pointed out...
Walli asked 16/5, 2012 at 10:47

1

Solved

I am using the following IE conditional comment: <!--[if gt IE 7]> Here is some code. <![endif]--> This works great to keep the code from rendering in any IE lower than 8. However, t...

© 2022 - 2025 — McMap. All rights reserved.