Tag-only Styles
Walter Davis
13 Sep, 2011
Freeway offers a slightly hidden way to create styles that apply to elements on your page without being explicitly applied to an element in the design view. Here’s how to make them.
When you create a style in Freeway in the normal manner, that style will be named something, and it will need to be applied to at least one element on your page before it will publish into that page’s style rules. (If you’re using External Stylesheets, then this rule is slightly more relaxed — you only have to apply the style to one page in order to have it available to all the pages that share that external stylesheet.)
But if you are doing something even a little bit advanced, you may find it necessary to create a style that will apply to something Freeway knows nothing about. For example, you may be using a CMS to insert content into your pages, and that CMS may be relying on certain tags having a particular visual style in order to work predictably.
If you’ve come this far, we’ll assume you know what the selector (the part of your style rule outside of the curly braces) needs to be. For this example, we want to affect all H3 tags inside of the HTML box with the id contentArea. So if you were writing that in a text editor or a dedicated CSS application, you would write #contentArea H3. To create this style in Freeway, follow these steps:
- Open the Styles palette, if it isn’t already, and switch to your text styles tab.
- Click on the gear icon and choose New Style…
- The resulting dialog will have two fields at the top: Tag and Name. Tab or click into the Tag field and enter your entire selector, i.e.:
#contentArea H3. - Tab into the Name field and delete whatever Freeway has helpfully entered there.
- Last, and most important, tab out of the Name field and save the style rule. If you don’t follow this step, the auto-name will sneak back in the moment you do anything else with the dialog.
If you have followed these steps precisely, you should now have a style rule that you can edit to change just the parts of the page you are interested in affecting. Because this style does not have a name, it will be published into all pages automatically. You do not need to (and should not) apply this style to anything on your page.
You won’t see the effect of your styling decisions within the Design interface, but they will appear in the Preview mode, or in any browser that understands those rules.
