Questions tagged [conditional-comments]

Conditional Comments are a feature of Microsoft's Internet Explorer web browser. They allow a web page to check the browser version.

Conditional Comments are a feature of Microsoft's Internet Explorer web browser. They allow a web page to check the browser version.

See the various articles in the matter:

248 questions
11
votes
1 answer

IE Conditional Comments and Chrome/Firefox

I am using the following IE conditional comment: This works great to keep the code from rendering in any IE lower than 8. However, this also keeps the code from rendering in Chrome and Firefox. Any…
10
votes
2 answers

Vue html comment handling

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' });
Adriano
  • 3,788
  • 5
  • 32
  • 53
9
votes
2 answers

Is it bad to put

I want to use conditional comments to make a DIV appear ONLY in browsers with IE7 or older, like this: As far as I understand, conditional comments…
Gaelen
  • 305
  • 5
  • 19
8
votes
4 answers

Is there any way to do "if IE" inside of a CSS file?

I know you can put conditional statements to load different CSS files if you are in Internet Explorer, but can you do this inside of a CSS file? I have a situation where I want the right margin to be 20 if it's Internet Explorer but 10 if it's any…
leora
  • 188,729
  • 360
  • 878
  • 1,366
7
votes
2 answers

Loading css (stylesheet) ONLY for IE11

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 Google and find an alternative as below : @media all and…
Shubh
  • 6,693
  • 9
  • 48
  • 83
7
votes
4 answers

ie10 stylesheet

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 stylesheets for IE 9 and 8 and those are fine. i even tried…
7
votes
5 answers

IE Stylsheets/ Conditional comments Not working

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. That…
Iqbal Khan
  • 363
  • 2
  • 6
  • 22
6
votes
1 answer

why are conditional comments implemented in IE?

less of how & more of a why question here...I tried searching around some & couldn't quite find the answer I was looking for. I'm curious why conditional comments exist within IE? did Microsoft implement this into the different browser versions…
axelav
  • 435
  • 3
  • 9
6
votes
3 answers

IE7-only stylesheet for XSL document

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:

All other browsers

don't work on Windows Phone 7! Or, at least not on…
neeKo
  • 4,280
  • 23
  • 31
5
votes
3 answers

Conditional Comments within CSS

I am currently developing a theme for a homepage but ran into a few problems. For whatever reason I have no access to editing the html code itself, and I need to write custom .css for IE (specifically versions below IE9). I have "two" issues. First…
arvdsn
  • 75
  • 1
  • 2
  • 7
5
votes
3 answers

IE condition CSS include

Hy there... I have a problem with Internet Explorer conditional comments... I use this condition The problem is that in < IE8.0…
Stazh
  • 197
  • 1
  • 2
  • 13
5
votes
6 answers

CSS conditional comments for other Browsers except IE?

So far I know, the conditional comments are only supported for different Versions of IE. Likeways, can we provide conditional comments for other browsers too. If Yes, How? If no, what could be the best alternative?
Starx
  • 77,474
  • 47
  • 185
  • 261
1
2
3
16 17