The blog of Jafar Aliyev


Home :: Programming :: Developer tips :: Web design

Creation date:

CSS hacks

Nowadays many designers give all measures in pixels, including the font sizes. They fit their site to Internet Explorer and show to the clients their site only in IE. They can escape many malformed effects, because IE doesn’t change font size, given in absolute measures. If this measure is in pixels, then nothing can disfigure their design. Even after changing the size of system fonts, the view of size will be the same in IE. What to do (or how to be) the shortsighted user with such a “good” designed sites. Fortunately there’s Mozilla browser, that ignores absolute font size, and increases/decreases the font size as wants user.
Therefore such sites make horrible effects with Mozilla (Firefox), Opera, Netscape and some other good browsers. Here I would like to talk about good CSS design, fitted to different browsers.

About famous problems (IE double cutting, padding-margin bug, etc.) you can read in web. Here I’ll give you some specific bugs with CSS, that are inherent to all browsers. Hereinafter “All browsers” means IE, Mozilla (Firefox), Netscape and Opera, because all my sites I check with these browsers and if it necessary write different behavioral CSS rules.

All notes here are checked with IE6.0, Mozilla 1.7.13 , Firefox 1.5.03 and Opera 9.0. Some of them may be fixed in new versions. Although Firefox uses Mozilla core, there are some differences in some cases. If I don’t write the browser explicitly, it means that the problem exists in all three browsers.

Fixing overflow: hidden in IE

Internet Explorer bug with tall block

Overflow of inner block

The meaning of margin in Internet Explorer and Firefox

IE bug with first line

Fixed background image

Measuring units for padding

Height of parent container

<div> against <table>

© Copyright

All articles in this site are written by Jafar N.Aliyev. Reproducing of any article must be followed by the author name and link to the site of origin(this site). This site also keeps the same rules relative to the articles of other authors.