Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2007
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IE6, having to create a class for default element styles

    Just a quick question:

    I have the below style for my text inputs and IE6 ignores it...

    Code:
    input[type=text]{margin: 3px 0; padding: 1px; outline: 0;}
    In order for IE6 to obey the above style, I have to create a separate class, and apply it to each text input. It's not a huge deal, just redundant.

    Code:
    input.text{margin: 3px 0; padding: 1px; outline: 0;}

    Is this the only work-around in IE6 or am I missing something?

    Matt

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    The first one has never worked in IE6. Thats the only work-around or you could try using the IE7 script from Dean Edwards. The only downside of this is users with JS disabled don't get the benefits but users with js enabled the first code you posted would work as intended.

    http://dean.edwards.name/weblog/2008/01/ie7-2/
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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