hi there


It s relly wirde; my conditional comments are not working. it s so simple but i have no idea whats wrong is with the code.


<!-- [if lte IE 8]>
<link href="ielte8.css" rel="stylesheet" type="text/css" />
<![endif]-->

<!--[if lte IE 7]>
<link href="ie7.css" rel="stylesheet" type="text/css">
<![endif]-->

<!--[if lte IE 6]>
<linkhref="/ielte6.css" rel="stylesheet" type="text/css">
<![endif]-->

thanks for any hint.

Dani AI

Generated

A few clarifications and a short checklist that expand on what happened to and the path-question raised by .

Common causes (quick checks)

  • Inspect the raw page source (View Source), not the DOM in devtools. WYSIWYG editors or template systems sometimes insert extra comment markers or whitespace around the conditional opener; that exact sequence must remain intact for IE to recognize it.
  • Open the generated HTML in a plain text editor and search for template markers or additional comments (Dreamweaver uses template markers that can wrap or split blocks). If the conditional ends up inside or next to another comment block the browser will ignore it.
  • Verify the stylesheet tag itself is well-formed in the generated output. Missing whitespace or malformed attributes can make the link tag invisible to the parser even if the conditional is correct.
  • Check the stylesheet URL by loading it directly and by watching the Network panel to confirm a 200 response and correct casing on servers that are case-sensitive. This addresses the file-path angle brought up earlier.
  • Remember browser support: conditional comments are an Internet Explorer feature supported through IE9. IE10+ and modern browsers ignore them, so testing must be done in a version that supports them or an equivalent document mode.

Fixes and workflow advice

  • When using Dreamweaver templates, put IE-only conditionals in a part of the template that is not altered by the template engine (master/head area), or edit the template in code view so no automatic reformatting occurs.
  • For new projects, prefer feature detection or server-side user-agent classes instead of relying on conditional comments, since the technique is deprecated in modern browsers.

These steps explain why template tools often "make a mess" of conditional comments and provide concrete ways to verify and repair the generated HTML.

Recommended Answers

All 4 Replies

Remove the lte .

<!--[if IE x]>

<![endif]-->

Regards
Arkinder

No, not working.

Are you using the correct relative path for each CSS file - Are they inside the same folder as the HTML document?

Regards
Arkinder

ok, i fixed, thanks any way. It s seems like Dreamweaver templets made some mess.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.