How do I change the line-height with this code?
<font color="#FFFFFF">
<span style="float: left; position: relative; top: 25px; left:100px">
text here&l开发者_Python百科t;br>and more text here....
</span>
</font>
Perhaps there's a more imperative style associated with that element somewhere else in the cascade? Load that sucker up in Chrome and inspect the element via Web Developer extension - it will show the computed style on that element, and any overridden styles.
EDIT:
In response to comments:
<p style="line-height:1.2em;">Your text here</p>
That should do it, or adjust the 1.2em upward by small amounts. Remember though, this will only apply the line height style to that specific <p>
tag. If you can /need to / want to be consistent, apply that style="line-height:1.2em;"
to the paragraph's containing element, like:
<div style="line-height:1.2em;">
<p>Paragraph 1 will have the same line-height as</p>
<p>Paragraph 2.</p>
</div>
This is not true usage. I think the true usage is;
<span><font></font></span>
But you should try this;
<style>
.class1{
height: 100px;
width: 250px;
background-color: #000;
color: #fff;
font: normal 12px Verdana;
line-height: 100px;
}
</style>
<div class="class1">your text message is here...</div>
you can use another way for line-height in font property;
font: normal 12px/100px Verdana;
精彩评论