HTML Hacks

November 24th, 2008

1. The problem with Min-width in InternetExplorer

IE understands this property as width. But the following hack works:

#page { width: expression (((document.documentElement.clientWidth || document.body.clientWidth) < 780)? "780px": "100 %") }

Validator would charge this as not valid, therefore I advise to transfer it into HTML code:

<!--[if gte IE 5]> <style type="text/css"> #page {width: expression(((document.documentElement.clientWidth || document.body.clientWidth) < 780)? "780px" : "100%")} </style> < ![endif]--> </style>

From the first page loading IE5 does not know what clientWidth is, therefore it is necessary to address to this size in <head> with the help of JavaScript...

CSS hacks overview

November 24th, 2008

Browsers and standards is an eternal pursuit. Because of discrepancies to standards and different ways of rendering of pages the largest part of the web designer time takes the smoothing down these discrepancies. As a result, instead of effective work, the designer enters unnatural relations with browsers, wasting precious time. In this article some css hacks (they are also called css-filters) which will help you to solve some problems of discrepancy of browsers are considered...