Quote:
Originally Posted by patrik
Thanks, yes I played with line-height, but it also changed the space between the second line (when it was spread over two lines on the device.)
But your suggestion about block did the trick!
h3 { line-height:4em; }
.line2 { display:block; line-height:1em; }
Seems to give the flexibility I wanted.
|
Do not use line-height for anything. You do not need it and it's best to use the default line height. It's best to be as minimal as you can with the CSS and line-hight is one thing that doesn't need to be there. Also, display: block does nothing so it can go. Use top and bottom margins like this...
Code:
h3 {
margin-top: 1em;
margin-bottom: 1.5em;
text-align: center;
}
.line2 {
font-weight: bold;
text-align: center;
}
The only think you need to add to that CSS code is font-size if you want specific font sizes. Oh and the way your CSS is written is not as easy to read as the way I've written it.