Resize Mobile width for specific post

Posted in: Newspaper
Post count: 20

Hi all,

For the following post, the editor used direct html code for font size (<span style=”font-size: 24pt;”>)
http://www.musiccorner.gr/best-of-2014-100-songs-3-114308/

That has a side effect for mobile view, “loosing” a part of words in cells.
http://i61.tinypic.com/2n6ud6r.jpg

I’m wondering if there is a trick to bypass the html font size and have a clear mobile view.

Best Regards!

S.

Post count: 6600

Hi,

Yes, you can use custom css to reduce the font size on mobile screen view and use the media query that I have paste below to do it:

/* responsive phone */
@media (max-width: 767px) {

}

Thanks

Post count: 9544

fyi,
you should avoid inline HTML/CSS in posts, and instead create a custom style, then apply the style class to the span or div, as applicable.

Some upcoming security settings may cause browsers to ignore inline CSS altogether (meaning in the body, not inline CSS specified in the head as classes).

so,
For the following post, the editor used direct html code for font size (<span style=”font-size: 24pt;”>)

better to create class,
.ourcustomfs24{font-size:24px; line-height:1.5em}

then do
<span class="outcustomfs24">Our special headline without semantic meaning</span>

We do this for custom sidebar text block in some stories for an info box, and also for custom blockquote, etc.

This also would allow you to create a custom @media query for mobile, just for that style class; such as making the class 16px for the mobile media size.

  • This reply was modified 11 years by simchris.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.