Results 1 to 2 of 2

Thread: expression in css

  1. #1
    Join Date
    Dec 2009
    Location
    hyderabad
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation expression in css

    I am using expression in css for my light box it is working fine in all browsers but i was unable to get HTML validate it .....

    Is there any solutions to get website HTML validate or is there any solution for expression

    Wether we can use expression in css or not

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    CSS expressions are IE proprietary and do not work (are ignored by) other browsers. They will never validate. You may put them in a separate stylesheet and use IE conditional comments to make that stylesheet (if on the page) or stylesheet link (if an external stylesheet) look like a comment to all but IE. They still won't be valid, but the validator will also think they are comments, so won't bother you about them, ex:

    HTML Code:
    <!--[if IE]>
    <link rel="stylesheet" href="ieOnly.css" type="text/css">
    <![endif]-->
    See also:

    http://msdn.microsoft.com/en-us/libr...12(VS.85).aspx

    for more on how these comments work.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •