Javascript - Time Greeting font size

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
MGD4me
 
 
Posts: 278
Joined: Tue May 02, 2017 11:56 pm
Location: British Columbia, Canada

Javascript - Time Greeting font size

Post by MGD4me »

My website uses 4 breakpoints. When using the built-in Javascript 'Time Greeting' script, there doesn't seem to be a way to set the font size at each of the individual breakpoints to different values.

Is there a work-around, so that I can have larger fonts for wider viewports, and a reduced font size for phone/tablet viewports?

Thanks...
User avatar
crispy68
 
 
Posts: 2833
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Javascript - Time Greeting font size

Post by crispy68 »

You could add some CSS and use media queries to change the font size.

For example:

Code: Select all

<style>
@media (max-width:969px){#greeting{font-size:42px;}}
@media (max-width:767px){#greeting{font-size:24px;}}
</style>
MGD4me
 
 
Posts: 278
Joined: Tue May 02, 2017 11:56 pm
Location: British Columbia, Canada

Re: Javascript - Time Greeting font size

Post by MGD4me »

Thanks, Crispy...

That did the trick!
I had to work out the breakpoint settings, and at first confused points versus pixels, but after a bit of tweaking, it now works perfectly. :D
Post Reply