Results 1 to 5 of 5

Thread: backwards compatibility

  1. #1
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default backwards compatibility

    I'm no wiz with getting my new code which I plan on doing over in css3 -but what if I am worried about browsers that are not compatible with it -how would I go about coding my css to revert to older code?

  2. #2
    Join Date
    Dec 2010
    Posts
    4
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    I don't suggest using CSS3 since not even modern browsers fully support it. Wait a few more years before actually using it.

    Here's a great resource regarding CSS features supported in commonly used browsers:
    http://www.webdevout.net/browser-support-css

  3. The Following User Says Thank You to petercpwong For This Useful Post:

    evan (01-16-2011)

  4. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    You can use css3 wherever it is not critical - for extra effects, etc. - as long as it won't break your layout or make something unusable.

    With some properties, you can use "fallbacks" - for example, css3 allows gradients and semi-transparent backgrounds:
    Code:
    div{ background: url(semi-transparent.png); }
    div{ background: hsla(0,100%,50%,0.2); }
    the css2 browser ignore the second rule because it doesn't understand it, and shows the background image (which is supposedly a similar color and opacity). The css3 browser understands hsla, so it "overrules" the previous background rule.

    You can also look into using javascript to provide css3 effects in browsers that don't support them. That all depends on how important a particular effect is to you.

  5. The Following User Says Thank You to traq For This Useful Post:

    evan (01-16-2011)

  6. #4
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default

    Thank you, I need to know hoe to write a conditional statement to derect what browser or device someone has so the right CSS will be applied -as with a mobile device.

  7. #5
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

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
  •