How to target IE only

Discussion in 'HTML & Website Design' started by cryoffalcon, May 8, 2012.

  1. #1
    Hi,
    I want to use this gradient background only for IE

    background: #4f4f4f;
    background: -moz-radial-gradient(center, ellipse cover, #4f4f4f 0%, #0e0e0e 100%);
    background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#4f4f4f), color-stop(100%,#0e0e0e));
    background: -webkit-radial-gradient(center, ellipse cover, #4f4f4f 0%,#0e0e0e 100%);
    background: -o-radial-gradient(center, ellipse cover, #4f4f4f 0%,#0e0e0e 100%);
    background: -ms-radial-gradient(center, ellipse cover, #4f4f4f 0%,#0e0e0e 100%);
    background: radial-gradient(center, ellipse cover, #4f4f4f 0%,#0e0e0e 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4f4f4f', endColorstr='#0e0e0e',GradientType=1 );
    Code (markup):
    there are methods that are for style sheet I don't want to use them as I want IE to use all the css that is for all browsers only that IE don't read the part of the gradient I want it to use the gradient above instead.
    How can this be done?
     
    cryoffalcon, May 8, 2012 IP
  2. IDocXD

    IDocXD Member

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #2
    This can be completed from a browser condition by choosing what CSS file you wish to use, would be something like this:

    
    
    <head>
    <!--[if IE 6]>
    
    <link src="../css/style.css"></link> Special instructions for IE 6 here <![endif]-->
    </head>
    
    Code (markup):

    Or you can simple cut down on the CSS seeing that IE can only read one of the CSS properties:

     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4f4f4f', endColorstr='#0e0e0e',GradientType=1 );
    
    
    
    Code (markup):
     
    IDocXD, May 8, 2012 IP
  3. alamest

    alamest Well-Known Member

    Messages:
    277
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    133
    #3
    IE is always the trouble for the programmer, I don't do programming so I don't know about it but I have my own programmer and I will ask from him and let you know soon..
     
    alamest, May 8, 2012 IP
  4. cryoffalcon

    cryoffalcon Peon

    Messages:
    102
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I will be waiting for your reply ^^
     
    cryoffalcon, May 9, 2012 IP
  5. cryoffalcon

    cryoffalcon Peon

    Messages:
    102
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    this 'filter: progid' thing are you sure it is a valid code to use? will it work for IE 7,8,9?
     
    cryoffalcon, May 9, 2012 IP