CSS outline – the border which will not break your layout

If you wish to mark an element with a border you will also change the rendered size of the content. So that is where the CSS “outline” property comes handy. You probertly have allready seen it, when something gets focus many browsers adds an outline to that element with say a dotted thin grey outline. Continue reading


Extend Object with method that handles CSS values in javascript

If you are working with CSS and need to for instance add or subtract a value to a CSS value like “15px” or “3em” this method “getCSSValueAndUnit()” will come in handy. Simply add the code somewhere in the top to extend the “Object” object.   The method is used as follows: "10px".getCSSValueAndUnit(); which will return Continue reading


Printing HTML pages, make screen and print appear the same.

When using external stylesheets on a webpage you can specify which “media” it should apply to. For instance see these lines: <link rel="stylesheet" href="Blueprint/screen.css" type="text/css" media="screen, projection" /> <link rel="stylesheet" href="Blueprint/print.css" type="text/css" media="print" /> As you might allready have guessed the screen.css will be choosen for screen (read: browser) and projection mode. When printing the Continue reading