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 13 of 13
  1. #1
    Senior Coder
    Join Date
    Jun 2008
    Location
    Cornwall
    Posts
    2,097
    Thanks
    297
    Thanked 12 Times in 12 Posts

    Exclamation css code not compatible with certain browsers?

    Hi All,

    I am trying to fix my css code so that it is all compatible with various browsers.

    my question is how do i find out which code to use for example i have this code
    Code:
    min-height:35px;
    which is unsupported by safari but im unsure of the equivelant which works for safari, what is the best way around this? do i have seperate css files for each of the browsers? or can i fiddle my existing browser and get that working?

    many thanks
    Luke

  • #2
    New Coder
    Join Date
    Oct 2009
    Posts
    26
    Thanks
    2
    Thanked 1 Time in 1 Post
    This should work for Safari:

    Code:
    div{
     display:table-cell;
     height:100px;
    }
    As many people know 'min-height' isn't widely supported and Safari is one to not support, that said I'm sure it'll be added sooner or later. But the above code should be used for Safari instead of 'min-height'.

    I do hope this has helped.

  • #3
    Senior Coder
    Join Date
    Jun 2008
    Location
    Cornwall
    Posts
    2,097
    Thanks
    297
    Thanked 12 Times in 12 Posts
    hi mate thanks for the code

    do i need to wrap this code in safari tags so that only safari will read it? or could i just add this anywhere in my current css file?

    cheers
    Luke

  • #4
    New Coder
    Join Date
    Oct 2009
    Posts
    26
    Thanks
    2
    Thanked 1 Time in 1 Post
    Well yes if you only want Safari to see it and not any other browser.

  • #5
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,854
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    i have this code
    Code:
    min-height:35px;
    which is unsupported by safari but im unsure of the equivelant which works for safari,
    Safari should recognise that property. There might be some other wrong thing at your end, which is affecting the above one.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #6
    Senior Coder
    Join Date
    Jun 2008
    Location
    Cornwall
    Posts
    2,097
    Thanks
    297
    Thanked 12 Times in 12 Posts
    hmm

    here is my full class
    Code:
    .individual_headers{float:left; width:115px; padding-left:5px; margin-top:5px; margin-bottom:5px; overflow:hidden; min-height:35px; font-size:12px;}
    just noticed the safari is only a warning but the other validation for this is an actual error
    Unsupported property: min-height Affects: Internet Explorer for Macintosh 5.2.

    any ideas?

    many thanks
    Luke

  • #7
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,854
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    here is my full class
    That's insufficient to have a test at our end.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #8
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    You need to make sure your HTML is valid as well. Do you have a link so we can check out the full page?
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #9
    Senior Coder
    Join Date
    Jun 2008
    Location
    Cornwall
    Posts
    2,097
    Thanks
    297
    Thanked 12 Times in 12 Posts
    yeah mate here is a link.
    http://www.kernow-connect.com/dvds.php

    all the main category pages call the same file its only the cotent that changes. and all except the video games page validates

    cheers

  • #10
    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
    So what is the problem? All current versions and later versions of safari 3 support min-height. IE 5.2 for Mac isn't even supported anymore and they are up to OSX 10.4 or something so no need to worry about that. You can fake min-height in IE 6 by just assigning an actual height to the element through the * html hack (which will only work in IE 6 if not in quirks mode) or through a conditional comment.

    This is a good reference on what is supported and what isn't.

    http://www.quirksmode.org/css/contents.html
    Last edited by _Aerospace_Eng_; 06-29-2010 at 02:29 PM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • Users who have thanked _Aerospace_Eng_ for this post:

    LJackson (06-29-2010)

  • #11
    Senior Coder
    Join Date
    Jun 2008
    Location
    Cornwall
    Posts
    2,097
    Thanks
    297
    Thanked 12 Times in 12 Posts
    hi mate,

    the 'problem' is that certain bits of my css code is throwing up validation errors in dreamweaver and im just trying to solve them

    also not sure how popular/upto date opera 7.03 is but my page looks like this
    http://api.browsershots.org/png/orig...a105b06540.png

    thanks for the link will check it out
    luke

  • #12
    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
    Don't worry about what Dreamweaver says. Its likely your version of DW is outdated so its reporting warnings that really don't matter anymore. If the CSS is valid according to one the better known validators ie w3.org then its fine. You can't cater to every browser ever made. FYI Opera is at version 10. Usually people who use other browsers other than IE normally update on a regular basis when a new version comes out.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • Users who have thanked _Aerospace_Eng_ for this post:

    LJackson (06-29-2010)

  • #13
    Senior Coder
    Join Date
    Jun 2008
    Location
    Cornwall
    Posts
    2,097
    Thanks
    297
    Thanked 12 Times in 12 Posts
    ah cool thanks mate!!!


  •  

    Posting Permissions

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