My website users are using TinyMCE editor to write contents and after finish writing contents they save it to my database. I then fetch those articles from database and display it using the following code:
<h2><?php echo $records ['article_title']; ?></h2>
<div style="text-align:justify; font-size:12px;">
<?php echo $records ['article_content']; ?>
</div>
If my users use font size or format texts, my CSS inside the div doesn't work. For example; if any user uses 14px font size and set the text-align to right for an article, the code style="text-align:justify; font-size:12px;
inside the div doesn't work.
I don't want to display the content in font-size more than 12px;
Could you tell me how to do it ?
Thanks :)
Edit
In my CSS file I have added the following code:
.textformat{
text-align:justify !important;
font-size:12px !important;
}
and then in my view file:
<div class="textformat">
<?php echo $records ['article_content']; ?>
</div>
But still its not working, please suggest me something else. Thanks :)