Post Archive
› May 14, 2003
Rubber Headers in CSS
I've written a technique how to create rounded, oval and similar headers of random width. See more in the Rubber Headers article.
Comments
1. May 14, 2003 11:44 AM
2. May 14, 2003 01:38 PM
Quote this comment
Blake Posted…
I was thinking about it and you don't need the long left image. why not just use a small left image and right image and use background color for the middle. Look at how I did it here without making the left background image so long. Plus this way it is infinitly expandable on a fluid layout and the image file size is smaller. http://blakems.com/experimental/rh.html3. May 14, 2003 06:39 PM
Quote this comment
pixy Posted…
Blake: Well, I explained it in discuss in my own blog (czech only, sorry). The major reason for it is due to the difference between quirk and standard-compliant browser mode. Your example is in transitional DTD. This switches most browsers into the quirk mode, where height = content+padding. Just watch it in WinIE5 - the header is only 18px high, and there are missing two pixels bellow... This is why I used the image for all the background - otherwise I am (you are) forced to add some height-hack to keep the height same in all browsers/modes. However, if you correct the height, yes: only solid-color background can be used in the middle and the images may be smaller.4. May 14, 2003 06:41 PM
Quote this comment
pixy Posted…
Blake: Well, I explained it in discuss in my own blog (czech only, sorry). The major reason for it is due to the difference between quirk and standard-compliant browser mode. Your example is in transitional DTD. This switches most browsers into the quirk mode, where height = content+padding. Just watch it in WinIE5 - the header is only 18px high, and there are missing two pixels bellow... This is why I used the image for all the background - otherwise I am (you are) forced to add some height-hack to keep the height same in all browsers/modes. However, if you correct the height, yes: only solid-color background can be used in the middle and the images may be smaller.5. May 14, 2003 06:44 PM
Quote this comment
pixy Posted…
Oops, I'm sorry. I really don't know why my previous post is displayed twice...6. May 15, 2003 11:51 AM
Quote this comment
Andreas Posted…
Pixy, this is nice. As for the antialiasing problem, maybe my PNG & CSS entry is of any use here: [edited] an example with antialiased borders for alpha transparency aware browsers and non-antialiased borders for IE. See it as a gentle "browser upgrade"-campaign. ;-)