...

View Full Version : css code not compatible with certain browsers?



LJackson
06-29-2010, 12:14 PM
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

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

bennyy007
06-29-2010, 12:24 PM
This should work for Safari:



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.

LJackson
06-29-2010, 12:36 PM
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

bennyy007
06-29-2010, 12:41 PM
Well yes if you only want Safari to see it and not any other browser.

abduraooft
06-29-2010, 12:49 PM
i have this 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.

LJackson
06-29-2010, 01:01 PM
hmm

here is my full class

.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

abduraooft
06-29-2010, 01:09 PM
here is my full class That's insufficient to have a test at our end.

Rowsdower!
06-29-2010, 02:04 PM
You need to make sure your HTML is valid as well. Do you have a link so we can check out the full page?

LJackson
06-29-2010, 03:19 PM
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

_Aerospace_Eng_
06-29-2010, 03:25 PM
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

LJackson
06-29-2010, 04:10 PM
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/original/e4/e455643d430ed77964914da105b06540.png

thanks for the link will check it out :D
luke

_Aerospace_Eng_
06-29-2010, 05:32 PM
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.

LJackson
06-29-2010, 05:41 PM
ah cool thanks mate!!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum