Jump to content

Css vs Browsers!


zang8027

Recommended Posts

Ok, so i use css to format all my pages. I know its an on going problem with everyone out there. The problem of browser compatibility. I know a few tricks with the conditional statements for IE but i have no idea how to get it to work on safari. I usually make a .css file that is my main file. I use this for firefox. Once i get it looking right on firefox, i use the IE conditional statements to get it looking good on Internet Explorer.

 

My question is, how do you get websites to look right on Safari. I have a website that works fine on IE and firefox, but then it gets butchered with safari.  Is there a safari conditional statement?

Link to comment
https://forums.phpfreaks.com/topic/124952-css-vs-browsers/
Share on other sites

You shouldn't have to apply css hacks for browsers other than IE. The problem I'm seeing is you're testing in just one browser (firefox) as you're developing your site design. You should always code bit by bit and test any changes you make in a variety of browsers at the same time, such as IE, Firefox, Safari, Opera, Google Chrome etc.

 

As well as testing your design within a browser always ensure your HTML/CSS validates.

Link to comment
https://forums.phpfreaks.com/topic/124952-css-vs-browsers/#findComment-645724
Share on other sites

I use Yahoo! YUI css reset. This little stylesheet makes most browsers (even IE) behave very similarly. By using this, I make my life much easier. If you look at my website source code, you will see the link to the yahoo stylesheet.

 

I agree with wildteen88. You shouldn't need hacks, and if you do then you probably need more practice with CSS.

Link to comment
https://forums.phpfreaks.com/topic/124952-css-vs-browsers/#findComment-645865
Share on other sites

hey i need some help with a conditional statement to, i don't know why, but it just doesn't seem to work,

 

I'm using

 

<!--[if lte IE 7]>

  <link rel="stylesheet" type="text/css" href="IE_hack.css">

<![endif]-->

 

which fixes my IE browser

 

but when i look at the page on my safari browser nothing seems to work, the statement is

 

<!--[if Webkit]>

  <link rel="stylesheet" type="text/css" href="safari_hack.css">

<![endif]-->

 

any help with this would be very appreciated :)

Link to comment
https://forums.phpfreaks.com/topic/124952-css-vs-browsers/#findComment-645878
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.