Tag Archives: css

CSS media expressions

An example of using style sheet media queries, or media expressions. In a nutshell apply conditions to which style sheets are imported depending on the client device properties. <link rel="stylesheet" type="text/css" media="screen, projection" href="css/main.css"/> <link rel="stylesheet" type="text/css" media="screen and (min-device-width: 1600px), projection" href="css/main-hires.css"/> In this case only devices with a minimum resolution of 1600 pixels [...]

Posted in Web Design | Also tagged | Leave a comment

Valid xHTML Strict Template

A simple HTML template to create valid, xHTML 1.0 documents. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>title</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />   <script type="text/javascript" src="script.js"></script> <style type="text/css">   </style> </head> <body>   <div id="root"></div> </body> </html> template.html

Posted in Web Design, Web Development | Also tagged , | Leave a comment

Reset CSS with Typography & Clearfix.

A reset CSS which will get rid of the browsers default styling on all elements. Making it a lot easier to build consistent cross browser web sites. reset-fix.css Extras: Clearfix CSS class, for clearing floated child nodes. Typography percentages in the comments select {margin:0;} applied for IE

Posted in Web Design | Tagged | Leave a comment

IE6 transparent PNG fix with AlphaImageLoader

A CSS based workaround for the IE6 transparent PNG bug. Apply in an IE6 specifc style sheet. background-image: none; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’images/icon.png’); This fix can only used in certain scenarios. Will render links unclickable Will cause form elements to be unfocusable When applied to unordered/ordered lists, will hide the list item text

Posted in Web Design | Also tagged , | Leave a comment