Change Background Color of Single Page in Topic

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Change Background Color of Single Page in Topic

Post by LTinker68 »

Then it sounds like the background color was declared in a couple of places and you're changing one place but missing it in another. (Which may have already been mentioned.) I'd open the main topic stylesheet in the Internal Text Editor and do a search on background-color -- make sure that you don't have two declarations in competing locations. For instance, if you have it specified in the html tag and the body tag, then the body tag will win, so if you keep changing it in the html tag, then you won't see the change because you need to be changing it in the body tag. Likewise if you have several html and/or body classes.

Second, do a search in the stylesheet for all references to masterpages, which would most likely be in the html tags if you're using several masterpages. Then open those masterpages in the Internal Text Editor and see if there are any inline styles on the body tag there that may be overriding the style of the body tag in the main stylesheet.

Third, while you're looking in the stylesheet, make sure you didn't make your html and/or body tag changes in the wrong medium(s). You might have thought you were in the default medium but were actually in the print medium and that background color wouldn't appear in the online output.

Fourth, open the problem topics in the Internal Text Editor and remove any inline styles that may be competing. For instance, in the topic code you posted above, you have a class on the html tag and a color declaration on the body tag. That probably happened when you were troubleshooting, but remove them both so that you're starting from scratch (sort of) on the topic and only change one at a time until you get the appearance you want.

Fifth, try making ugly, obvious background color choices so that you can see the changes taking place. If your background colors are too subtle, then your monitor may not be displaying them properly, especially if you're using light grays or similar. So pick a vibrant red or something so that you're sure you're seeing the color you selected. (You can always change it back once you find the correct location.)

Lastly, always delete the Output folder before building. That'll force the web browser to load all the information for the help output instead of caching some information, like some changes to your stylesheet.

Apologies if any of these suggestions are repeats.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Change Background Color of Single Page in Topic

Post by doc_guy »

What I noticed from your code is that even though you have set the color in the body tag, you have *several* block-level items that have a white background set. For example:

<h1 style="color: #ffffff;">Welcome!<a name="kanchor1"></a></h1>
<p style="color: #ffffff;">Welcome to <span style="color: #203838; font-weight: bold;">Audit and Recovery (A<span style="font-size: 10pt;">&</span>R)</span>, the
post claim audit system that gives you the power to recover millions in lost claims transaction funds.
<img src="../Resources/Images/Symbol Help 2 (3).png" />For more information on how to use the <span style="color: #203838; font-weight: bold;">Audit and Recovery (A<span style="font-size: 10pt;">&</span>R)</span> system, please select from the following:</p>
<p style="color: #ffffff;"> </p>

Notice all those #FFFFFF attributes? Those will all make the color of those elements white.

You've got *a lot* of inline formatting, which will always override the parent style, which always overrides the style sheet.
Paul Pehrson
My Blog

Image
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Change Background Color of Single Page in Topic

Post by NorthEast »

doc_guy wrote:What I noticed from your code is that even though you have set the color in the body tag, you have *several* block-level items that have a white background set.
That's setting the text colour to white, not the background colour.
(I dunno, these MVPs...)
knichols wrote:Here is the code for the topic - as you can see I have tried to change the colors in the stlesheet, masterpage, and then hard-coded the new color in the body tag:
I copied and pasted your code into a file and opened it in IE, and I got a page with white text on a bluey-grey background. Obviously I don't have the A&R.css file, but styles in that wouldn't take precedence over the inline styles anyway.

Are you saying you don't see these colours on your PC, or are you seeing these colours but they're not what you expected?

If you're setting colours in the stylesheet and wondering why they're not appearing in the output, it's because the inline styles used in the topic will take precedence over the stylesheet.

Also, you have a large amount of inline formatting in your topic, is this an imported project by any chance?
knichols
Propeller Head
Posts: 38
Joined: Thu Nov 20, 2008 2:45 pm

Re: Change Background Color of Single Page in Topic

Post by knichols »

Hi,

I'm seeing the colors on the unformatted topics, but when I format the topic, the built help shows the default screen color, the one for the entire help project, not the one I set in the master page (which is the same as the color I set again in the topic itself - hoping that would work.)

The white text is just for this one topic, and working fine - that's supposed to be there.

Yes, this is an imported project - I imported it from another Flare project, then disconnected the link - is that causing the problem?
knichols
Propeller Head
Posts: 38
Joined: Thu Nov 20, 2008 2:45 pm

Re: Change Background Color of Single Page in Topic

Post by knichols »

I forgot to say, the gray background is the color the background is supposed to be - and the color the unformatted topic is. The formatted help displays the background as the default color, a light green.

So it seems that your file is working, but mine is running into some code that makes the topic go back to the default background color that is set for the entire topic.

Thank you for your help on this. I'll keep trying to figure out what is wrong - I am running out of ideas.
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Change Background Color of Single Page in Topic

Post by NorthEast »

Ok, I don't really understand what you mean by unformatted and formatted topics, what is the formatting that you're doing to the topics? Applying inline formatting, setting the topic's master page, setting the topic's stylesheet?

Also, I'm not sure what you mean by a 'default background colour', and whether it's for the project or topic. Where do you set that colour - in the topic, master page, stylesheet?
knichols
Propeller Head
Posts: 38
Joined: Thu Nov 20, 2008 2:45 pm

Re: Change Background Color of Single Page in Topic

Post by knichols »

Sorry, I'm being unclear.

When I said "default," I meant the background color that I have in my project stylesheet's body tag - the background color that all the other topics display. This is light green. I have one topic that I have set to use a different background color - gray instead of light green.

When I said "formatted," I meant built. The help project, when built, displays all topics, even the one I set to use a different, gray background, with the light green background.

The topic that I want to display using a different background color has the gray background color tagged in the following ways:

* The topic uses a different master page, which calls a different html tag. This html tag has the gray background color.
* The topic itself has a style attached to the topic's body tag to change the background color to gray. The topic has the following body tag:

Code: Select all

 <body style="background-color: #dbe3e0;">

The strange thing is, when I view the topic in Flare, it looks great. It has the gray background, just as I wanted. But when I build the help, the help project displays this topic with the green background, the background of all the other topics. It's as if, in the build, it refuses to acknowledge the new information.

You must be so tired of dealing with this issue by now - I appreciate your help.

K Nichols.
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Change Background Color of Single Page in Topic

Post by NorthEast »

knichols wrote:* The topic uses a different master page, which calls a different html tag. This html tag has the gray background color.
You don't set the background colour on the html tag in the master page, you need to set it on the body tag.

In the master page, set the colour on the body tag; e.g. <body style="background-color: #dbe3e0;">

The body tag from the master page (including style / class) is what's used in the output, Flare will ignore anything set in the body tag in the topic. That's why your topic looks ok in the editor, but not in the output.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Change Background Color of Single Page in Topic

Post by doc_guy »

Dave Lee wrote:
doc_guy wrote:What I noticed from your code is that even though you have set the color in the body tag, you have *several* block-level items that have a white background set.
That's setting the text colour to white, not the background colour.
(I dunno, these MVPs...)
Oh. Duh. It was late. On release day. Is that an excuse? (Well, it IS an excuse, but is it an acceptable excuse? :roll: )
Paul Pehrson
My Blog

Image
knichols
Propeller Head
Posts: 38
Joined: Thu Nov 20, 2008 2:45 pm

Re: Change Background Color of Single Page in Topic

Post by knichols »

Listen, anyone who is even bothering to still reply to my problem is a heroine/hero in my book. I am thoroughly sick of it and it's my issue!

Yes, some of the text was hard-coded white in this topic. I was not trying to add to the general confusion; I just chose not to create a style for the white text since it is literally the only white text in the entire project.

I'm a deadline too, (hence my confusing posts - I will try to improve them) but I will read your posts over again and try again.

Thanks for all the help,

any further input or solutions would be much much appreciated.

K Nichols
knichols
Propeller Head
Posts: 38
Joined: Thu Nov 20, 2008 2:45 pm

Re: Change Background Color of Single Page in Topic

Post by knichols »

The change you recommended did not work either - putting the background color in the body tag of the master page.
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Change Background Color of Single Page in Topic

Post by NorthEast »

I'm not sure what to suggest really.

The code you posted shows that your page does have the right background colour set in the output, i.e. it's blue-grey, not light green. So, I'm not sure how the light green colour from your stylesheet is being displayed.

(The only I know to override inline styles is to use '!important' property in the stylesheet, and I'd guess you would know if you'd done that.)

On the tests I've done, if I set an inline style on the body tag in the topic then that isn't carried through into the output, but it is carried through if I set it on the master page's body tag. To test it out, try setting all your background colours to be different, e.g. set it to red in the stylesheet, green in the topic, and blue in the master page - then build the help and see which one appears in the body tag of the output.
knichols
Propeller Head
Posts: 38
Joined: Thu Nov 20, 2008 2:45 pm

Re: Change Background Color of Single Page in Topic

Post by knichols »

thanks for your perserverance. I'll keep working on it, and if I have to work around it, I think I'll survive. : )

Thanks again,

K Nichols
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Change Background Color of Single Page in Topic

Post by KevinDAmery »

Have you tried just creating a different master page with the background colour applied to it, then using that master page on the appropriate topics?
Until next time....
Image
Kevin Amery
Certified MAD for Flare
knichols
Propeller Head
Posts: 38
Joined: Thu Nov 20, 2008 2:45 pm

Re: Change Background Color of Single Page in Topic

Post by knichols »

Good suggestion. That was one of the first things I tried. Then I tried hard-coding the change into the topic itself. Then I added !important.
Nothing works. (In a fit of desperation, I have left all three of these still in the project. I don't know why I do since none of them work.)

Here's the strange thing - It worked once yesterday and once today. I wonder if I need to clear something out of the output? But if that is the problem, I can hardly remove old files from the output every time I build.

I was SO excited this morning when I got the background color to work. I believe it was my first build of the day. But then, I changed nothing, but after I built the second time, we were back to the incorrect background color, and all my changes were ignored.

So if anyone knows any reason why my first build of the day would accept my changes, but none of the later ones, could you please let me know?

Thanks very much,

K Nichols
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Change Background Color of Single Page in Topic

Post by KevinDAmery »

You can clean the output folder using the Build > Clean Project menu, and it normally takes a few seconds - so there's no reason you can't do it just before building :)
Until next time....
Image
Kevin Amery
Certified MAD for Flare
knichols
Propeller Head
Posts: 38
Joined: Thu Nov 20, 2008 2:45 pm

Re: Change Background Color of Single Page in Topic

Post by knichols »

aah! Thanks for the tip. Actually it's working now, and after each build. The trouble is, I can't quite figure out what I did to make it work consistently. oh well, at least I can copy the one that works and figure it out if I need to.

Thanks for all the help,

K Nichols.
Post Reply