applying stylesheets
applying stylesheets
i am sure i have asked this before
but i am still unable to get stylesheets to actually effect any topics
i have gone as far as to remove the old stylesheet, and then changed it to the new one.
now i have default stylesheet showing on all topics though on the primary target page i have the master stylesheet as my new one..
this is just not reflected in any of the topics.
i have closed and opened the application. i have also deleted the output folder before re building to it.
is there a workable workaround for this bug? it has been the bane of my existence for the last 6 months
but i am still unable to get stylesheets to actually effect any topics
i have gone as far as to remove the old stylesheet, and then changed it to the new one.
now i have default stylesheet showing on all topics though on the primary target page i have the master stylesheet as my new one..
this is just not reflected in any of the topics.
i have closed and opened the application. i have also deleted the output folder before re building to it.
is there a workable workaround for this bug? it has been the bane of my existence for the last 6 months
-
wclass
- Propellus Maximus
- Posts: 1238
- Joined: Mon Feb 27, 2006 5:56 am
- Location: Melbourne, Australia
Re: applying stylesheets
Not sure why it doesn't work - I don't know of specific stylesheet application bugs. Here is a checklist that might help to troubleshoot:
However, it is also common to specify a master sheet at the target level. This is very useful if you generate the same output for several different clients and just want to change the look and feel. In this case, I would avoid setting a project default and specifically set the stylesheet at the target level.
- Is there a default style sheet set? Check Project > Project Properties > Defaults tab.
- Do you specify a master stylesheet in the target? Check the general tab.
- Is there a stylesheet specified on the topic - or is there more than one? I'd look at the code for the topic and see what is written in the <head> section.
- If you have a master stylesheet on the default target, that will be applied when you preview your topics.
However, it is also common to specify a master sheet at the target level. This is very useful if you generate the same output for several different clients and just want to change the look and feel. In this case, I would avoid setting a project default and specifically set the stylesheet at the target level.
Margaret Hassall - Melbourne
Re: applying stylesheets
thank you,
i have already set the project and target level stylesheets... is there a way to undo that? i see there is an option to pick my stylesheet or default. but there is not a way to have it not set.


re your last bullet point, also that is the problem... that i set the stylesheet at the target level and it does not show in any preview
i have already set the project and target level stylesheets... is there a way to undo that? i see there is an option to pick my stylesheet or default. but there is not a way to have it not set.


re your last bullet point, also that is the problem... that i set the stylesheet at the target level and it does not show in any preview
Re: applying stylesheets
so i looked at the stylesheet editor and i selected "stylesheet links"
and it says that the only stylesheet available for my project is "MadCap", which i assume it the default stylesheet that is displaying on every topic.
this is odd because i have created and named a stylesheet and applied it to the project (in project properties) and to the target in the target editor.
and i have the stylesheet links dialog box open in the stylesheet editor for that stylesheet that doesn't show.


even when i try to add a new stylesheet, i am not sure where i should pull it from since it is not showing in the project/content/resources/stylesheets folder (at least in the stylesheet links dialog box -- where it seems that the issue lies)

how can i select my new stylesheet in the stylesheet links dialog box?
and it says that the only stylesheet available for my project is "MadCap", which i assume it the default stylesheet that is displaying on every topic.
this is odd because i have created and named a stylesheet and applied it to the project (in project properties) and to the target in the target editor.
and i have the stylesheet links dialog box open in the stylesheet editor for that stylesheet that doesn't show.


even when i try to add a new stylesheet, i am not sure where i should pull it from since it is not showing in the project/content/resources/stylesheets folder (at least in the stylesheet links dialog box -- where it seems that the issue lies)

how can i select my new stylesheet in the stylesheet links dialog box?
-
wclass
- Propellus Maximus
- Posts: 1238
- Joined: Mon Feb 27, 2006 5:56 am
- Location: Melbourne, Australia
Re: applying stylesheets
Where is your css file? Is it in the Resources folder? The Stylesheet links dialog should find any stylesheet within the "/Content/" folder - is your "numhelp??.css file outside the project?
And yes, you can clear the project/target settings by selecting "default".
And yes, you can clear the project/target settings by selecting "default".
Margaret Hassall - Melbourne
Re: applying stylesheets
thank you,
i'd not changed the stylesheet to default in the project properties yet.
now i am able to apply the one stylesheet in my project to individual pages (tho setting it at the target level doesn't work... but that is ok)
but when i make some changes to some elements of the stylesheet, the elements show in the stylesheet editor, but not on the topic and not in the style window...
for example, here for li (list), it should have #E9E8E8 as the background color, and that is set in the editor, but the background color listed in the style window (and what shows in the xml editor preview) is #ffffff
see and compare the two red boxed areas below


i'd not changed the stylesheet to default in the project properties yet.
now i am able to apply the one stylesheet in my project to individual pages (tho setting it at the target level doesn't work... but that is ok)
but when i make some changes to some elements of the stylesheet, the elements show in the stylesheet editor, but not on the topic and not in the style window...
for example, here for li (list), it should have #E9E8E8 as the background color, and that is set in the editor, but the background color listed in the style window (and what shows in the xml editor preview) is #ffffff
see and compare the two red boxed areas below


-
wclass
- Propellus Maximus
- Posts: 1238
- Joined: Mon Feb 27, 2006 5:56 am
- Location: Melbourne, Australia
Re: applying stylesheets
The pictures aren't showing for me?fltii wrote:for example, ...
see and compare the two red boxed areas below
Margaret Hassall - Melbourne
Re: applying stylesheets
here, i uploaded the two pics as attachments to the forum... can you see these?
the top one should be the sole stylesheet's listing for the background color of the "li" element, and
the bottom one should be the style window's listing of that element's background color (not as it is set in the stylesheet -- it is definitely the same stylsheet, b/c that is what comes up when i click edit style... )
the top one should be the sole stylesheet's listing for the background color of the "li" element, and
the bottom one should be the style window's listing of that element's background color (not as it is set in the stylesheet -- it is definitely the same stylsheet, b/c that is what comes up when i click edit style... )
You do not have the required permissions to view the files attached to this post.
Re: applying stylesheets
It doesn't work because there is local inline formatting on that tag.
The Styles pane on the right is showing that you have background-color: #ffffff; set as inline formatting on that tag, so that will override anything in your stylesheet. You need to remove the inline formatting (e.g. use Unformat button on the toolbar).
Is this from an imported project?
The Styles pane on the right is showing that you have background-color: #ffffff; set as inline formatting on that tag, so that will override anything in your stylesheet. You need to remove the inline formatting (e.g. use Unformat button on the toolbar).
Is this from an imported project?
Re: applying stylesheets
thank you, Mr. Lee.
it may have been imported when it was originally created.
where on this page can i go to "unformat"?
to which toolbar are you referring?
as you see i do have the formatting window up as well, but when i change the background color there, it just goes back to #ffffff....
it may have been imported when it was originally created.
where on this page can i go to "unformat"?
to which toolbar are you referring?
as you see i do have the formatting window up as well, but when i change the background color there, it just goes back to #ffffff....
You do not have the required permissions to view the files attached to this post.
Re: applying stylesheets
i also found the format toolbar, but i see no place where i can, "unformat"
Re: applying stylesheets
Along the top of the writing area, right-click on the span block that corresponds to your inline style, then select Unbind from the popup menu that appears.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: applying stylesheets
thanks for all of your help on this stuff, folks.
i think i have a topic page that is showing all of the relevant style elements. after trying to efficiently control style elements for the last year, i'm pretty happy.
though going through each topic page's properties, and manually changing the stylesheet is a bit time consuming, i am just glad that it works at this point.
=)
i think i have a topic page that is showing all of the relevant style elements. after trying to efficiently control style elements for the last year, i'm pretty happy.
though going through each topic page's properties, and manually changing the stylesheet is a bit time consuming, i am just glad that it works at this point.
=)
Re: applying stylesheets
That probably explains it; the inline formatting may come from the project it was imported from.fltii wrote:it may have been imported when it was originally created.
It's on the top toolbar, it looks like a B with a red X through it.fltii wrote:where on this page can i go to "unformat"?
to which toolbar are you referring?
It's best not to change any formatting using the toolbar, because then you're applying inline styles which will override the stylesheet.fltii wrote:as you see i do have the formatting window up as well, but when i change the background color there, it just goes back to #ffffff....
For example, in your screenshot I can see two separate span tags and one strong tag; these may be applying formatting that's different to your stylesheet.
Re: applying stylesheets
thanks Dave, i now know to avoid using the toolbar to format, and watch out for formatting left over from the initial imported project.
though i have mainly used the toolbar to create bulleted lists. it seems like when i do that, flare uses the stylesheet defined formatting for those lists. is there a better way to select unordered list style?
i see that unformat button at the top, though it is greyed out. do you think that is because i have already manually selected the stylesheet in topic properties?
though i have mainly used the toolbar to create bulleted lists. it seems like when i do that, flare uses the stylesheet defined formatting for those lists. is there a better way to select unordered list style?
i see that unformat button at the top, though it is greyed out. do you think that is because i have already manually selected the stylesheet in topic properties?
Re: applying stylesheets
Using the toolbar is the normal (and only) way to create a list.fltii wrote:though i have mainly used the toolbar to create bulleted lists. it seems like when i do that, flare uses the stylesheet defined formatting for those lists. is there a better way to select unordered list style?
The Bullet List and Numbered List options will add plain ul/ol tags; so they will follow your stylesheet.
Using the other list options will add some additional inline formatting that sets the list-style-type; e.g. Square Bullet list, Lower-alpha numbered list.
Re: applying stylesheets
If you like using a FrameMaker-esque scheme, you can do something like the following:
- replacing ordered lists with something like
(another style can set n=1)
Code: Select all
p.Numbered { mc-auto-number-position: outside-head; margin-left: 30px; mc-auto-number-offset: 20px; mc-auto-number-format: 'N:{n+}. '; } - replacing unordered lists with something like
Code: Select all
p.Bulleted { mc-auto-number-position: outside-head; margin-left: 30px; mc-auto-number-format: '{family WingDings}n {default} '; mc-auto-number-offset: 10px; }
Re: applying stylesheets
Plus you can cross-reference to an auto-number paragraph-designed list item but you can't xref to an ol/ul-created list item. And you can get fancier on the numbering scheme (e.g., A.1.a or 1.1.2).gwadmin wrote:I find this less complicated then working with the combination of <li> formatting within <ul>/<ol>, especially in tables.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: applying stylesheets
Same problem here. I'm trying to remove a previous style sheet and attach a new clean one. This is a project-level master style sheet for a webhelp project. I have no target level style sheets.
After I added the new stylesheet to the resources/stylesheets folder and switched to the new one in the Projects/Properties dialog box, the system still used the old one--the new styles were not used and the topic source code still showed the old one being attached. Then I removed the old stylesheet from the resources/stylesheets folder leaving only the new one I want to use. Now when I try to build, I get a message saying a linked stylesheet file is missing and the build is aborted.
After removing the old stylesheet, when I clicked the "Open Master Stylesheet" button, a message pops up saying it can't find the old one even though I have the new one specified in the Project/Properties dialog box.
One more thing...before removing the old stylesheet from the stylesheets folder, I checked to see what was in the "Displaying linked stylesheets" box (or whatever it's called). The old stylesheet was still listed in the right window of that box and the left window was empty. That leads me to think that I may have been fooling around with the linked stylesheet feature when I was first learning this tool (only been using it a little over a month) and may have screwed up Flare's internal link tracking by trying to change the master style sheet when it was already linked to something else. Any chance that might be true?
I'm thinking the next thing I'll try is to create an enirely new project and then try to import the one I've been working with, hoping I don't get the old style sheet with it...or at least that it will let me attach a new one. How does that sound for a winner?
After I added the new stylesheet to the resources/stylesheets folder and switched to the new one in the Projects/Properties dialog box, the system still used the old one--the new styles were not used and the topic source code still showed the old one being attached. Then I removed the old stylesheet from the resources/stylesheets folder leaving only the new one I want to use. Now when I try to build, I get a message saying a linked stylesheet file is missing and the build is aborted.
After removing the old stylesheet, when I clicked the "Open Master Stylesheet" button, a message pops up saying it can't find the old one even though I have the new one specified in the Project/Properties dialog box.
One more thing...before removing the old stylesheet from the stylesheets folder, I checked to see what was in the "Displaying linked stylesheets" box (or whatever it's called). The old stylesheet was still listed in the right window of that box and the left window was empty. That leads me to think that I may have been fooling around with the linked stylesheet feature when I was first learning this tool (only been using it a little over a month) and may have screwed up Flare's internal link tracking by trying to change the master style sheet when it was already linked to something else. Any chance that might be true?
I'm thinking the next thing I'll try is to create an enirely new project and then try to import the one I've been working with, hoping I don't get the old style sheet with it...or at least that it will let me attach a new one. How does that sound for a winner?
-
JenniferR
- Propeller Head
- Posts: 76
- Joined: Tue May 12, 2009 2:07 pm
- Location: California's Central Valley
Re: applying stylesheets
I'm struggling with the application of stylesheets right now, too. I've got a project with several stylesheets and several targets. I want to use different stylesheets for various targets. All of the content in this project has been converted from FM. When I did the conversion, I named it "MajorConversion".
I try apply a stylesheet at the Target level and am able to select the "Styles" stylesheet, however the styles from that stylesheet don't appear in my output. So, I check the stylesheet assigned in the Topic Properties for each of the topics in this particular TOC. The stylesheet in the Topic Properties is "MajorConversion", but the field is grayed-out so that I cannot change it. After that, I open the File List and view the links for the topics in my TOC. They are all linked to "MajorConversion.css".
Here's what I see: So, everywhere I look, I can see that MajorConversion.css is applied to the TOC in my project, but I cannot figure out how to change the CSS to the one I want.
Can anybody offer a suggestion?
Thanks,
I try apply a stylesheet at the Target level and am able to select the "Styles" stylesheet, however the styles from that stylesheet don't appear in my output. So, I check the stylesheet assigned in the Topic Properties for each of the topics in this particular TOC. The stylesheet in the Topic Properties is "MajorConversion", but the field is grayed-out so that I cannot change it. After that, I open the File List and view the links for the topics in my TOC. They are all linked to "MajorConversion.css".
Here's what I see: So, everywhere I look, I can see that MajorConversion.css is applied to the TOC in my project, but I cannot figure out how to change the CSS to the one I want.
Can anybody offer a suggestion?
Thanks,
You do not have the required permissions to view the files attached to this post.
Jennifer
"Whenever you find yourself on the side of the majority, it is time to pause and reflect." -- Mark Twain
"Whenever you find yourself on the side of the majority, it is time to pause and reflect." -- Mark Twain
Re: applying stylesheets
Go to the Project Properties screen (Project > Project Properties) and set the Master Stylesheet field to "(default)" and see if that takes care of the problem.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
JenniferR
- Propeller Head
- Posts: 76
- Joined: Tue May 12, 2009 2:07 pm
- Location: California's Central Valley
Re: applying stylesheets
Hi Lisa,
Forgot to mention... that is set to "default".
Forgot to mention... that is set to "default".
Jennifer
"Whenever you find yourself on the side of the majority, it is time to pause and reflect." -- Mark Twain
"Whenever you find yourself on the side of the majority, it is time to pause and reflect." -- Mark Twain
Re: applying stylesheets
If you open one of the topics in the Internal Text Editor, do you see a stylesheet reference hard-coded in the topic code? If so, remove that hard-coded line. There shouldn't be any stylesheet references hard-coded at this point -- they're inserted into the topic at build time. If the topics were imported from FM, though, then they may have come across with the reference in the topic. If that turns out to be the case, then you should be able to do a find-and-replace in Flare to remove the reference from all topic files.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
JenniferR
- Propeller Head
- Posts: 76
- Joined: Tue May 12, 2009 2:07 pm
- Location: California's Central Valley
Re: applying stylesheets
Lisa,
How do I know if it's hardcoded? I'm not familiar with code...
How do I know if it's hardcoded? I'm not familiar with code...
Jennifer
"Whenever you find yourself on the side of the majority, it is time to pause and reflect." -- Mark Twain
"Whenever you find yourself on the side of the majority, it is time to pause and reflect." -- Mark Twain
Re: applying stylesheets
Right-click a topic in the Content Explorer pane and select Open with > Internal Text Editor. You'll see the page-behind code for the topic. The first few lines of code should look something like:
The lastBlockDepth, lastHeight, and lastWidth attributes might have different values and you might have a title tag if you inserted a title in the topic's Properties screen.
If the stylesheet reference has been hard-coded in the topic, then the first few lines will look something like the following:
If you see that link href line pointing to a stylesheet, then that's the line you need to delete. If it's there, try deleting it from the topic and save the topic (while in the Internal Text Editor view) then rebuild the help and see if that topic is picking up the stylesheet selected in the target.
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="161" MadCap:lastWidth="896">
<head>
</head>
<body>If the stylesheet reference has been hard-coded in the topic, then the first few lines will look something like the following:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="161" MadCap:lastWidth="896">
<head>
<link href="Resources/Stylesheets/MajorConversion.css" rel="stylesheet" />
</head>
<body>Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.