Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Oct 2007
    Posts
    13
    Member #
    16010
    Hi

    Is there any way to write classes that it's apply only to IE6 & not apply to any other browser include IE7


    Regards
    Mohammed Sunel

  2.  

  3. #2
    Senior Member solidgold's Avatar
    Join Date
    Jun 2006
    Posts
    766
    Member #
    13373
    conditional if statements - google it

  4. #3
    Senior Member straight_up's Avatar
    Join Date
    Dec 2003
    Location
    Pennsylvania/Arizona
    Posts
    601
    Member #
    4309
    exactly. those are the best way to do this sort of thing. though once in a while I'll use the html>body and * html hacks to target "not IE 5/6" and "only IE 5/6" respectively
    I am Alan Hogan (@alanhogan on Twitter). I like PHP, UI/UX design, and OS X.

  5. #4
    Junior Member
    Join Date
    Oct 2007
    Posts
    13
    Member #
    16010
    Thank you but I want to write a class in a css file that should only read by IE 6

  6. #5
    Senior Member solidgold's Avatar
    Join Date
    Jun 2006
    Posts
    766
    Member #
    13373
    right, well that can't be done as far as I know.
    but it you use if statements you could either create a new CSS document or just embed the CSS in the page.

  7. #6
    Senior Member straight_up's Avatar
    Join Date
    Dec 2003
    Location
    Pennsylvania/Arizona
    Posts
    601
    Member #
    4309
    Code:
    * html .someClass{ property:value; }
    only works in IE 5/6.

    Better:

    Code:
    <head>
    ...
    <!--[if ie 6]>
    <link rel="stylesheet" type="text/css" href="only_ie_6.css" />
    <[endif]-->
    ...
    </head>
    I am Alan Hogan (@alanhogan on Twitter). I like PHP, UI/UX design, and OS X.

  8. #7
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    And it's highly recommended that you use conditional includes rather than hacks like the above, as hacks like the above rely on bugs that may disappear or reappear depending on what version is happening, while conditional includes are an (albeit non-standard) feature.

  9. #8
    Senior Member straight_up's Avatar
    Join Date
    Dec 2003
    Location
    Pennsylvania/Arizona
    Posts
    601
    Member #
    4309
    Quote Originally Posted by Shadowfiend
    And it's highly recommended that you use conditional includes rather than hacks like the above, as hacks like the above rely on bugs that may disappear or reappear depending on what version is happening, while conditional includes are an (albeit non-standard) feature.
    This is 100% true. I was just giving him what he asked for (he may be able to change CSS but not XHTML, for example, such as in his MySpace or something.)
    I am Alan Hogan (@alanhogan on Twitter). I like PHP, UI/UX design, and OS X.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:10 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com