SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2006
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Two classes for one element - browser question

    Does anyone know which web browsers (and which versions) do not support two classes for web page elements?

    For example, does IE6 support:

    Code CSS:
    <div class="mainText specialWidth">This is my content</div>

    And are there any other web browser oddities that I should be aware of before using two classes?

    Google-ing hasn't helped me much, so I was wondering whether one of you might be able to point to some browser-comparison chart or something.

    Thank you.

  2. #2
    SitePoint Enthusiast
    Join Date
    Dec 2009
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All browsers support multiple classes.

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2006
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    fendeanson: Thanks for the quick reply.


    While I'm agreeing with you that all modern web browsers support two classes, I was trying to gauge how far back this practice is supported.

    For example, IE4 and NN4 don't support two classes, and I admit, yes, those are archaic web browsers...but are there any other browsers/versions that might only interpret the second class, or neither one?

    Simply put, is there any kind of documentation that explains a little more about the "two classes" practice in a variety of web browsers? I've searched through this forum and Google-d Eric Meyer to no avail.

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    All browsers will correctly read the second class unless you concentate them as followed

    .oneclass.TwoClass (note how they are together)

    IE6 is buggy with that and will only read the second class. If you need to combine classes like that, it's just best to create a unique ID

    But AFAIK that's just basic CSS and every browser (even old) supports it
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  5. #5
    SitePoint Enthusiast
    Join Date
    Aug 2006
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, that's good to know.


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
  •