applying the homestyle css to the homepage

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
lise
Propeller Head
Posts: 35
Joined: Tue Mar 24, 2015 12:45 pm

applying the homestyle css to the homepage

Post by lise »

I've given up trying to figure this out myself. I've spent hours and hours trying all variations and I can't seem to get my Mainstyles.css to apply to my entire html5 output except for the home page, where I want to apply the StylesForHomepage.css. There are so many places to apply various stylesheets that it is very confusing to a newbie.

Here are my settings (all those I could think of):

Project Properties > Master Stylesheet: Mainstyles - this gives me the correct output for the entire project except the homepage.When I input StylesForHomepage here instead, I get the correct homepage but the rest of my project doesn't work out. See graphic below.

Primary Target > General > Startup Topic: /Content/Home.htm
Primary Target > General > MasterStylesheet: Default
Primary Target > Advanced > MasterPage: OtherTopics
Primary Target > Advanced > Stylesheet Medium: Default

Topics > Home.htm > properties > Topic Style Class: HomePage
Topics > Home.htm > properties > Stylesheet: StylesForHomepage.css (greyed out) (all other topics show "default" greyed out)

Skins > I modified some elements in here, and I don't think it is relevant to my issue because there is nowhere to specify a stylesheet

The way I understand stylesheets, the one closest to the actual text is the one that is applied when there is a conflict. I figure Topics is the closest, and since my Home.htm topic uses the StylesForHomepage rather than the more global Mainstyles, I figured I had this problem licked. Nope. I have no clue what I'm doing wrong.
You do not have the required permissions to view the files attached to this post.
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: applying the homestyle css to the homepage

Post by NorthEast »

If the topic stylesheet option is greyed-out, it means you have set a master stylesheet set somewhere.
It'll either be set in your primary target General tab, and/or the Project Properties.

Make sure the master stylesheet is set to Default (which means 'none') on the target(s) and project properties.
Otherwise, using a master stylesheet will effectively remove all stylesheet links in the output topics, and replace them with only the master stylesheet.
lise
Propeller Head
Posts: 35
Joined: Tue Mar 24, 2015 12:45 pm

Re: applying the homestyle css to the homepage

Post by lise »

Dave Lee wrote:Make sure the master stylesheet is set to Default (which means 'none') on the target(s) and project properties.
Otherwise, using a master stylesheet will effectively remove all stylesheet links in the output topics, and replace them with only the master stylesheet.
Ah, that's it. Thanks Dave.
I had that set to default a while back and got irritated by the "this topic isn't linked to a stylesheet" message right in the middle of trying to format something.
Just to confirm: there is no way in Flare to say 'always use this stylesheet unless I specify a different one in a topic'?

I'm wondering if these are options I could consider:
1. Get in the routine of always assigning a stylesheet to topics, including new topics (not my favourite option at all at the moment as I've got too many things to remember already).
2. Cheat by using a master stylesheet right up until final production and then remove it and apply the stylesheet to all topics in one shot.
3. Use a master stylesheet, generate the help file then manually modify the home.html to point to the alternate stylesheet instead of the master one.
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: applying the homestyle css to the homepage

Post by NorthEast »

lise wrote:Just to confirm: there is no way in Flare to say 'always use this stylesheet unless I specify a different one in a topic'?

I'm wondering if these are options I could consider:
1. Get in the routine of always assigning a stylesheet to topics, including new topics (not my favourite option at all at the moment as I've got too many things to remember already).
2. Cheat by using a master stylesheet right up until final production and then remove it and apply the stylesheet to all topics in one shot.
3. Use a master stylesheet, generate the help file then manually modify the home.html to point to the alternate stylesheet instead of the master one.
* If you need to use different stylesheets in topics (i.e. your stylesheets conflict and can't be used together), then you have two options: set the stylesheet in the topics, or set it in the master page (so different topic types use a different master page).

Tip - it's easier to set topic stylesheets from the File pane (rather than the Content pane); you can select multiple topics, open properties, and set the stylesheet.

* If it's ok to use your stylesheets together, and you want to use them for all topics, then you could use a master stylesheet. Then at the top of that stylesheet use an @import statement to include other stylesheets; e.g. @import url('another.css');

I use this second approach for our projects, but my stylesheets can be used for all topics - they don't conflict with each other.
lise
Propeller Head
Posts: 35
Joined: Tue Mar 24, 2015 12:45 pm

Re: applying the homestyle css to the homepage

Post by lise »

Dave Lee wrote:
* If it's ok to use your stylesheets together, and you want to use them for all topics, then you could use a master stylesheet. Then at the top of that stylesheet use an @import statement to include other stylesheets; e.g. @import url('another.css');

I use this second approach for our projects, but my stylesheets can be used for all topics - they don't conflict with each other.
Great, thanks Dave. I like that solution.
My project is based on the default html-5 top navigation template. I'll see if anything conflicts.
Post Reply