I have a heading ( <h1> ) that has a subcategory below it. (I used the <small> and set the font-size to a certain percentage, so it is perfect when I change the font-size title for smaller screens. I use em units if that matters.)
At first, the <small> was under the main heading, but I realized that I had forgotten the HTML5 DOCTYPE declaration. So, after I discovered this omission and corrected it, the gap was wrong.
Here is my code:
HTML:
<h1 class="banner">Justin Wilson<br /><small>WEB + GRAPHIC DESIGNER</small></h1>
CSS
h1.banner { text-align: center; display: block; font-family: 'arvil'; font-size: 6.5em; color: #94babd; } h1.banner > small { font-family: Helvetica, Arial, sans-serif; font-size: 27%; color: #888; letter-spacing: 1px; font-weight: 100; }
And here before and after:

I searched on StackOverflow, but I'm not sure how to do this. I read that the <br /> tag just breaks the lines, but inherits the spacing between the lines, and line-spacing: (value) does not work, has no margins or indents.
I need a simple cross browser solution. I used Chrome for the screenshot. IE6-7 support is not needed, although IE8 support will be nice.
source share