Layout Grids - Set Font Attribute per Browser View Size

Questions related to the Responsive Web Design tools of WYSIWYG Web Builder.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/respon ... esign.html
Please read this first before posting any questions! Also check out the example project to get an idea how the RWD concept works.

Responsive Web Design FAQ:
http://wysiwygwebbuilder.com/forum/view ... 10&t=63817
Post Reply
User avatar
ColinM
 
 
Posts: 962
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia

Layout Grids - Set Font Attribute per Browser View Size

Post by ColinM »

I'm just really getting into Layout Grids (yes, it should have happened a long time ago and why it hasn't is a long story of justification :D :? ). So if this request demonstrates I'm missing something, then please let me know.

Layout grids are great. But the font size and attributes stay the same and can't be changed unless you take the break point / responsive text route. So you are stuck with what could be overlarge texts (say the main header) - unless you use a BP - and optionally elect to scale objects via general settings.

Is it possible to be able to set font attributes based on screen (view) width. It would act like a BP. You only add it when you need it.



Hope that makes sense.
Yours truly
Colin M
Western Australia
User avatar
crispy68
 
 
Posts: 2729
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: *** NOT POSSIBLE ***Layout Grids - Set Font Attribute per Browser View Size

Post by crispy68 »

Hey Colin,

You could achieve it by doing this:

1. Create a custom style in the style manager. This will control the default view. In this example, the default view is 970px.

2. Add your own media queries like such to the <head> section in page properties using whatever breakpoints you want. In this example, I used 768 and 480.

Code: Select all

<style>
@media only screen and (max-width: 969px){.CustomStyle{font-size:48px;}}
@media only screen and (max-width: 767px){.CustomStyle{font-size:36px;}}
@media only screen and (max-width: 479px){.CustomStyle{font-size:26px;}}
</style>
where 'CustomStyle' is the name of your style created in the Style manager. The above only controls the font size but you could add other attributes if needed.
User avatar
ColinM
 
 
Posts: 962
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia

Re: *** NOT POSSIBLE ***Layout Grids - Set Font Attribute per Browser View Size

Post by ColinM »

Hey Crispy,

That's awesome mate! Thank you very much. 8)
Yours truly
Colin M
Western Australia
Post Reply