![]() |
CSS tip of the day.
I noticed in a few designs, making elements have rounded corners on say an h1 tag instead of square corners like adding borders do. They style the h1 tag to have a rounded corner image infront of the content, and then style a span tag to have a rounded corner image behind the content and then just do <h1><span>something</span></h1>.
Tip: Use the :before and :after pseudo-elements on the h1 tag with the content attribute to do it all in 1 tag. http://www.quirksmode.org/css/content.html Read that page, and figure it out, will make much cleaner code and less markup in the long run. |
damn them round corners :winkwink:
|
thanks...cleaning up some code now...
|
Quote:
I have been doing my own CSS designs for a while and I use the :after and content: in my clearfix class but never really know what they did because I got it from free design. |
why not just do your rounded corners with border-radius?
|
I hate CSS so much. It's a necessary evil, but I've been too lazy to sit down and learn it properly, so I end up just hacking shit up and taking forever to get stuff done.
One day. |
Quote:
|
doesnt work on IE tho
|
Quote:
|
Quote:
|
I guess you missed this part of the article...
Quote:
|
Quote:
Quote:
|
Quote:
CSS hacks like the one the thread starter are why I laugh at the CSS vs Table debate |
All times are GMT -7. The time now is 10:00 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc