Styled Headers With Underlines – CSS Tip
In a post yesterday, I had some new CSS working. My headings now have a nice line drawn under them. Here’s a sample:
Test Heading
This gives posts a more professional look that I really like. I got this idea from Paul’s style, but I wrote this CSS myself. Here’s the CSS you need to include:
1 2 3 4 5 6 7 | h2.with_underline { display: block; margin-top: 20px; width: 100%; color: #333; border-bottom: 1px #BBB solid; } |
So now wherever you want to have these nicely formated headers, just type:
1 | <h2 class="with_underline">Test Heading</h2> |
You could also make it global CSS so it affects all h2′s, and then you don’t have to put the class attribute in the HTML tag. This is a real simple addition to your CSS and makes your pages really pop.
-
http://paulstamatiou.com Paul Stamatiou
-
http://www.benhummel.com Benjamin Hummel
-
http://www.biscuitrat.com Ranjani
-
http://dbachrach.com/blog/2007/08/03/10-tips-to-make-your-blog-look-more-professional/ 10 Tips to Make Your Blog Look More Professional » Dustin Bachrach Blog



