Re:CSS Rounded corners: 7 lines of code, without any images
by zach on Wednesday May 28, 2008 @01:31AM
(#201807)
This is what YouTube used to style their box headers until maybe a year and a half ago.
Note that if you're using it to make a vertically compact title box, you'll have to do even more CSS funny business. That's because the rounded-corner header is a separate entity from the box below it, so you need to tweak the text to appear above its normal position in the box.
Confession time. Yes, I know because I myself admired YouTube's rounded corners enough to peek at their CSS and implement this technique as well. Hugs, not drugs, kids.
Note that if you're using it to make a vertically compact title box, you'll have to do even more CSS funny business. That's because the rounded-corner header is a separate entity from the box below it, so you need to tweak the text to appear above its normal position in the box.
Confession time. Yes, I know because I myself admired YouTube's rounded corners enough to peek at their CSS and implement this technique as well. Hugs, not drugs, kids.