Reputation: 9214
I have the div, containig some html-formatted text like normal, <b>bold</b>, <i>italic</i>
.
And I need to change font-size for all bold text only in that div.
So the question is how to do this in html/css, or maybe js?
Upvotes: 1
Views: 4838
Reputation: 8871
you can use element selector as :
#divId b
{
font-size:1.1em;
//what ever you want also
}
Upvotes: 1
Reputation: 16923
div.foo b, div.foo strong {
font-size: 1.2em
}
if you are using inline style like <i style="font-weight:bold">
case is more complicated.
Then you have to use jQuery+CSS
$('div.foo *[style=font-weight:bold]').addClass('myFontSize');
div.foo .myFontSize {
font-size: 1.2em;
}
But please mind it's not good practice.
Upvotes: 8