Page 1 of 1

Reduce h1 font size only on homepage and only on mobile devices. Is it possible?

Posted: Tue May 21, 2019 2:28 pm
by Boppe
OC 2

On my homepage I have text made in a Html module. A part of the text is h1. I understand that the font size of the h1 is set in stylesheet.css.
On desktop it looks good but on a mobile device I would like to reduce the font size.

Is it possible to reduce the h1 font size ONLY on the homepage and ONLY om mobile devices?

Re: Reduce h1 font size only on homepage and only on mobile devices. Is it possible?

Posted: Tue May 21, 2019 3:03 pm
by dparakhiya
Boppe wrote:
Tue May 21, 2019 2:28 pm
Is it possible to reduce the h1 font size ONLY on the homepage and ONLY om mobile devices?
yes, it's possible
using media query :
read more at :
https://www.tutorialrepublic.com/css-tu ... ueries.php
https://www.w3schools.com/css/css3_mediaqueries_ex.asp

Re: Reduce h1 font size only on homepage and only on mobile devices. Is it possible?

Posted: Tue May 21, 2019 3:31 pm
by thekrotek
dparakhiya wrote:
Tue May 21, 2019 3:03 pm
using media query :
Media query works for ALL devices, not only mobile. It only checks for window size.

Re: Reduce h1 font size only on homepage and only on mobile devices. Is it possible?

Posted: Tue May 21, 2019 3:52 pm
by dparakhiya
thekrotek wrote:
Tue May 21, 2019 3:31 pm
dparakhiya wrote:
Tue May 21, 2019 3:03 pm
using media query :
Media query works for ALL devices, not only mobile. It only checks for window size.
I mean this is the way you fix.
this is not a full answer
I gave a just way to solve this

Re: Reduce h1 font size only on homepage and only on mobile devices. Is it possible?

Posted: Tue May 21, 2019 3:56 pm
by thekrotek
dparakhiya wrote:
Tue May 21, 2019 3:52 pm
I mean this is the way you fix.
this is not a full answer
I gave a just way to solve this
With CSS you can only limit the style definitions to certain screen resolutions. To limit them by devices, PHP has to be used. Not sure, if the guy really needs to limit it by devices.

Re: Reduce h1 font size only on homepage and only on mobile devices. Is it possible?

Posted: Tue May 21, 2019 8:47 pm
by Boppe
Hi.
Thanks for your answers.

That's what I need change the heading size for certain resolutions.

I'm still studying media query tring to figure out how to make the changes and where.