Reputation: 5595
How do I have a bigger font size for only a single character in a sentence?
For a example: All characters except -
in "Click - sign" should be font size 13. And only -
should be font size 55. The sentence should look normal.
See Fiddle. The -
sign is higher than the rest of the text.
<div class="aa">
Click <span Style="font-size:30px; line-height:45px;">-</span> sign
</div>
aa {
font-size: 13px;
}
EDIT:
Upvotes: 3
Views: 1382
Reputation: 535
use this css
* {
margin: 0;
padding: 0;
}
p {
font-size: 13px;
}
p span.hlt_txt{
font-size: 55px;
line-height: 0;
vertical-align: top;
}
HTML
<p class="aa">
Click <span class="hlt_txt">-</span> sign
</p>
Upvotes: 0
Reputation: 27092
Here you can use position: relative;
for hyphen:
span {font-size:30px; position: relative; top: 3px;}
https://jsfiddle.net/fLvtjwcw/1/
Upvotes: 2