+ Reply to Thread
Results 1 to 4 of 4

Thread: Escape curly brace for IE conditional comment

Hybrid View

  1. #1
    Join Date
    Oct 2006
    Posts
    3

    Default Escape curly brace for IE conditional comment

    Hello. I'm trying to use an IE conditional comment to accommodate browser CSS differences. The syntax is the following:

    <!--[if lte IE 7]>
    <style>
    #mydiv {width:100px}
    </style>
    <![endif]-->

    I'm putting this in the <head> of the main.html page. However, when OR processes this, it strips out the {width:100px}. So, the IE conditional comments don't work.

    Is there a way to escape the curly braces {} so that OR will leave them alone? I tried the wiki and the forum but couldn't find an answer.

    Thank you.

  2. #2
    Join Date
    Oct 2006
    Posts
    3

    Default Re: Escape curly brace for IE conditional comment

    Well, I solved my problem by putting the IE conditional comments in an external file. Still, the question remains: can the curly braces be escaped to allow for regular HTML processing?

  3. #3
    Join Date
    Jul 2003
    Location
    California
    Age
    33
    Posts
    4,190

    Default Re: Escape curly brace for IE conditional comment

    put your content on multiple lines ie..
    {
    CODE
    }

    This will be the same for other code such as javascripts etc that use curly brackets
    Open-Realty 2 Documentation

    ~The Difference Between an ORDEAL and an ADVENTURE is ATTITUDE~

  4. #4
    Join Date
    Oct 2006
    Posts
    3

    Default Re: Escape curly brace for IE conditional comment

    Quote Originally Posted by Mick View Post
    put your content on multiple lines ie..
    {
    CODE
    }

    This will be the same for other code such as javascripts etc that use curly brackets
    Thanks Mick. That seems so obvious now that you point it out.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts