Citoshi
Citoshi

Reputation: 17

Can I adjust the font-size relatively, when the font-size is already defined in the HTML-code?

I've been looking for the right answer for this on the internet, but couldn't find anything that works.

This is my HTML-code:

<div id="wrapper3">

    <div id="content">
            <p><span style="font-family:verdana,geneva,sans-serif"><span style="font-size:14px">
this is text</span></span>&nbsp;</p><p><span style="font-family:verdana,geneva,sans-serif; font-size:14px">this is text</span></p>
    </div>

</div>

The code from the first <p> until the last </p> is generated by a wysiwyg-programm, so I can't change that (it's downloaded from my phpMyAdmin-database).
However, I want to enlarge the font-size 3 times of this text via CSS (or via another way, if anyone of you knows a better way).
So everything that's 14px right now, I want that to be 42px. However, I am not able to change this in the HTML code. For some reason, this doesn't work:

#content {font-size:3em;} // or:
#content p {font-size:3em;} // or:
#content p span {font-size:3em;}

It doesn't work with 300% instead of 3em, either.
Does anyone know how I should do this? Thanks in advance.

Upvotes: 0

Views: 113

Answers (1)

David Hariri
David Hariri

Reputation: 989

This JSFiddle shows the code you'll need to add to your CSS:

      #content span {
        font-size: 42px!important;
     }

Upvotes: 1

Related Questions