#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    4
    Rep Power
    0

    Couple of questions regarding CSS


    First question is, what does the -o-, -moz-,-ms- and etc mean in CSS when used in front of a style?

    Second, how can I target only IE8 for just one part of my code? I have a navigation bar using gradients in a nav tag, but this doesn't work in IE8 it seems, and since quite a few people still use XP, especially in businesses, it's important for it to work.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    299
    Rep Power
    8
    1) They are like prefixes which you use when you are trying to create cross browser compatible features. I think it is used in a lot of CSS3 techniques. For example when rounding borders, I use these prefixes.

    2) You can use conditional statements to target versions of IE. Check this site out and follow the steps to start using them.

    People will give you a more accurate answer in regards to both, I don't know the ins and outs of such things but I know why and when to use them

    Hope this helps you.

    Kind regards,

    NM.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    4
    Rep Power
    0
    I have a quistion about the conditional statements. So if I only use one and it's for IE8, it would ONLY read that code? Because I only need it for the navigation bar and nothing else, but I want the rest of it to be the same, because it works.
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    299
    Rep Power
    8
    No with the conditional statement, it only executes the code within the conditional statemnet IF the browser is IE8.

    for example, if you load your site in IE8 and you have a conditional statement for IE8, ALL of your CSS will STILL execute, but the conditional statement will also execute.

    If you are using FF for example, ALL your CSS is executed, but your conditional statement is ignored.

    Kind regards,

    NM.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    4
    Rep Power
    0
    Okay, I understand now. Thank you very much!
  10. #6
  11. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    299
    Rep Power
    8
    No problem, they can be a bit tedious when first using them so if you run into any issues, give us a shout. i'll be on for at least a few hours tonight.

    Regards,

    NM.
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    4
    Rep Power
    0
    I was able to fix my problem by putting the navigation HTML code into a div with a new id for my IE8 code and just put the beginning and end tags inside of the conditional statement.

IMN logo majestic logo threadwatch logo seochat tools logo