blog post

Browser-specific CSS have become a standards-aware web designers for good reason; ideally you shouldn’t need them. However, as long as the Internet Explorer 6 browser continues to hold significant market share, there will likely remain some cases where you need to use unfashionable CSS rules to accommodate outdated technology.

Source Code

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>

    <style>
        body,html,div{margin:0px 0px;padding:0px 0px;text-align:center;}

        /*Chrome ans safari*/
        body{background-color:blue}
        /*Chrome ans safari*/

         /*Mozilla Firefox*/
    @-moz-document url-prefix() {
             body{background-color:yellow; }
        }

         /*Mozilla Firefox*/

    </style>

</head>
<body align="center">

    <h2>Browser Sepcific CSS</h2> <br />
    <p>Mozilla Firefox</p>
    Change Background-color According to browser.


</body>
</html>

Output


Browser-Specific CSS
  • Share This Story


Pleas give your valuable comments to improve the contents.

about author

Atul kumar shukla


I'm Atul Kumar Shukla, working as a web developer.
Welcome to my Blog. This is my personal blog where i post my own questions and answers , articles about ASP.Net., SQL Server, HTML, CSS, Jquery and many more..

Visit Profile

Leave a comment

Name
E-mail
Url
Message

Get More Stuff
Subscribing to the TheOneblogs newsletter and get intersting stuff and updates to your email inbox.
Your Email

 

Style Switcher

Change Color

×! We use cookies to improve your user experience. More information