[Pro] FW7 Responsive html-text size breakpoint

Hi everyone,

i have a question regarding the responsive text design in FreewayPro 7. How do i manage that a HTML-Element with Text in it (for example “Freeway Pro is a great Programm”) not only automatically gets shorter in its width but also smaller in the letter-size when changing the window with from standard or Tablet:768px to Smartphone:320px.

My problem ist that when i create a HTML-Element in the Standard version, i only can change the Position and Element-Size for the other versions (Tablet/Smartphone) but the letter-size stays the same. And if i change the letter-size in the smartphone version it also changes in all the other versions.

I already red the i should use the em Style-extended-values and Body-Markup… (i must confess, that i don´t know much about css/html etc.) but when does FWP7 recognize that it should use a smaller lettersize for the narrower (smartphone) version.

To make a long story short: What do i have to enter where to change the letter-size when a smaller version (smartphone) is detected.

Thank you very much in advance.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Good question. I just discovered this as well. Hope there is an easy workaround.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

At this point, there is no responsive text feature in Freeway 7 - but that doesn’t mean that you can’t resize text at breakpoints.

Download example document.

There are two different methods that come to mind. Either you can use Freeway’s extended dialog to change the font size at the breakpoints on a per-HTML item basis, or you hand-code a bit of CSS. Neither of them are too difficult to do, but they each have their own set of limitations.

Using the extended dialog

The extended dialog is one of the most empowering corners of Freeway, and we can use it to make some text responsive.

The first thing that you need to know is that any text style that you are using that sets the size of the text needs to be applied to a HTML item that contains the text, not to the text itself. In other words, you can’t highlight text and apply the style that way, the style needs to instead be added to the parent HTML item.

Now, once you have that done, it’s time to make it responsive. First, activate the breakpoint you want to resize the text at. Now, right-click on the HTML item that contains the text, and in the menu click Extended. Hop over to the <div style> tab. Add this entry:

| Name | Value |
| - - | - - |
| font-size | 20px |

Of course, change 20px to whatever you want it to be. This can even be a em value if you roll that way.

Preview the site in your browser and shrink the window. You should see the font size shrink when you hit that point.

The biggest limitation with this method is that it can’t be applied globally (unless you are doing it to a master page). It will only change the font size of the element that you have it applied to. Also, styles must be added to the HTML container, not the text itself, or your extended value won’t override it at the breakpoint.

Using custom CSS

Using your own CSS to adjust font-size is easier than you would think.

First, apply your text style however you would like to in Freeway. Jot down the name of the style, you will need it in a second.

Now, we need to write the CSS. In Freeway’s menubar, go to Page > HTML Markup… > Before </head>. If you want to font size adjustment to be global, you will need to do this on a master page.

Paste this in:

<style>

/* 1100px breakpoint */
@media screen and (max-width:1000px) {
	.mystyle { font-size: 30px; }
}

/* 768px breakpoint */
@media screen and (max-width:768px) {
	.mystyle { font-size: 20px; }
}

</style>

Some things to note:

  • Change .text to the name of the text style in Freeway that you want to adjust, of course, keeping the dot prefix.
  • Tweak the breakpoint sizes to suite what you want - and even add your own, but just make sure that the breakpoints are sorted in descending size (so the larger breakpoints should be first).
  • Of course, change the font-size.

The nice think about this setup is that any text on the page that uses the mystyle style will obey your custom font sizes, and if you do this to a master page, any text across your site that uses the style.

End Notes

Which method you choose is up to you. As a rule of thumb, the first method is best if you are just trying the change the font size of one unique element in your website (like a bit of huge text on the homepage), while the latter method is far better if you need to adjust the size of large amounts of text across the website.

Of course, there are nicer, prettier ways of doing this (relative font size units like em), but I find that the above methods are the most Freeway and noob friendly. Once you are comfortable changing pixel-based dimensions, look into using the more advanced techniques - they can be really nice and easy once you understand them.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Dear Caleb,

thank you so much for your help and this detailed tutorial!!!
Finally i can do the rest of my work to be satisfied with the result. This is very kind of you!

Andrew


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Would make a great post on your blog, Caleb.
Many thanks!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Would make a great post on your blog, Caleb. Many thanks!

That is the plan. Also, if I can find the time, I plan on creating a screencast too. This is a much-needed feature in FW that didn’t make the cut for some reason. :slight_smile:


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hello I wonder if anyone can help please ?
I have followed the above tutorial which works fine (using the extended dialog) : ) But when I try to apply a H1 tag which is styled, inside the HTML box it seem to not work ?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The first thing that you need to know is that any text style that you are using that sets the size of the text needs to be applied to a HTML item that contains the text, not to the text itself. In other words, you can’t highlight text and apply the style that way, the style needs to instead be added to the parent HTML item.

Does this paragraph in Caleb’s instructions answer your question?

Am not sure what isn’t working: the overriding of size at breakpoints or the initial styling at full size.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

A guess:

If you need to target special TAGs you’ll need to add them to your extra markup

<style>

/* 1100px breakpoint */
@media screen and (max-width:1000px) {
.mystyle { font-size: 30px; }
h1 { font-size: 30px; } /*do something here*/
}

/* 768px breakpoint */
@media screen and (max-width:768px) {
.mystyle { font-size: 20px; }
h1 { font-size: 20px; } /*do something here*/
}

</style>

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes I have got up to that stage and that works all fine its when I add a H1 tag to the inside of the box it seem to stop working


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

any live link to the project available?

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes I have got up to that stage and that works all fine its when I add a H1 tag to the inside of the box it seem to stop working

Multiple posts on the same topic mean multiple answers. Try to avoid this please.

I answered the other thread.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Not sure what your exact issue is, but read through this thread — http://freewaytalk.net/thread/view/153511#m_157461 http://freewaytalk.net/thread/view/153511#m_157461 — for some more info about text styling with regard to h tags, p tags, and Caleb’s instructions.

Note that after resolving the issues with h1 styling, I discovered the info Thomas mentions explaining how to make responsive changes via the extended dialogue… as such I have been able to use the h1 tag for appropriate text AND make it responsive to media breakpoints.

www.godadog.com http://www.godadog.com/ — not a complete site but see how the text “EGOS ASIDE” changes size when it changes position at 568px)

On Feb 5, 2015, at 2:32 PM, DeltaDave email@hidden wrote:

Yes I have got up to that stage and that works all fine its when I add a H1 tag to the inside of the box it seem to stop working

Multiple posts on the same topic mean multiple answers. Try to avoid this please.

I answered the other thread.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options