.
Generally while developing a website, using clears and floats requires very little cross-browser tweaking. Sometimes; however, if you are trying to overlap objects, images, or using pixel specific placements, your website can look a bit off depending on the browser that you are using. Here are 3 ways to allow you to make your website to look the same (or close to the same) across all browsers.
buy propecia cheap
Conditional CSS is without a doubt my favourite cross-browser compatibility utility. It allows you, with the help of a generated PHP file, to condense all your cross-browser stylesheets into one single CSS file. Once you declare the PHP file from your index file accordingly, you only have to specify the browser using a tag followed by the style to give it specific styles for that brwoser. For example:
propecia cheap
#container {background:#000;}
propecia cheap
[if lte IE 8] #container {background:#CCC;}
propecia cheap
[if ! Opera] #container {background:#666;}
propecia cheap
- Head over to
- Select which server platform you use (PHP4, PHP5, C# or C.) Usually PHP5 is acceptable.
- Add your CSS file (from your web server) to the upload menu on the right hand side of the website and click Go!
- You will be given a file, c-css.php, to upload to your website.
- Call the c-css.php file from your index file using the following: @import “/path/c-css.php”;
- You can remove your CSS file declaration provided c-css.php has an accurate location of the CSS file (this avoids calling the CSS file twice.)
That’s it, you can now use tags, such as the ones stated in the above example. For a list of more browsers you can configure for, head to: .
buy propecia cheap
Conditional comments only work for Internet Explorer. It is a way to execute certain commands based on the identified browser. You can also use this method to attach different CSS files based on the browser version. For example:
propecia cheap
<!––[if IE]>
<link href=”styles_ie.css” rel=”stylesheet” type=”text/css” />
<![endif]––>
propecia cheap
<!––[if IE 6]>
<style type=”text/css”>
body {background-color:#ff00cc;}
</style>
<![endif]––>
To go one step further, you can also use this method to try converting people over from trying to access your website using Internet Explorer 6. For example:
<!––[if IE 6]>
<meta http-equiv=”refresh” content=”0;url=update.html”>
<![endif]––>
Which could then provide them with links to or on the update.html page.
Conditional Comments are a lot more bulky than the Conditional CSS method. Conditional Comments are not as widely used now as they used to be.
buy propecia cheap
This method should never be used. It results in your CSS file being read as partially invalid by search engines and it just looks sloppy. I have included it mostly just to give another method of creating a cross-browser compatible website, even if it is essentially done in the wrong way. Each browser uses a different character. For example:
propecia cheap
body {_color:#000;}
propecia cheap
body {*color:#000;}
propecia cheap
body {color/**/:#000;}
propecia cheap
body {color/*\**/:#000;}
There are many more, which can be found here: but again, they are not CSS-valid and should be avoided.