简体   繁体   中英

How to set the font-size of the text writed in WYSIWYG

After the text is submitted and saved in the database, then I get it and put to the page, but the problem is that the size of the font can be big or very big. However I need to set the font-size equal, not depending of the font-size used in the WYSIWYG, but I don't understand why the font-size isn't changing?

For example I have this:

<div style="font-size: 10pt">
<p>
BIG TEXT    
</p>
</div>

The <P> - is the text rendered from the WYSIWYG, and my style doesn't work, I also have tried to set !important - also don't work, how can I solve this problem?

I dont think you should add the font-size declaration to the <div> but to the <p> tag. another option is to add a piece of css into the header of your page like this:

<head>
    <style>
        p {
            size: 10px;
        }
    </style>
</head>

if u use like this .... whatever words using in p tag those all are get font size is 10 ...

 <div>
<p style="size='10px'";>
BIG TEXT    
</p>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM