How can you implement different styles for drop downs?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
fabina
Propeller Head
Posts: 19
Joined: Thu Mar 05, 2009 3:56 am

How can you implement different styles for drop downs?

Post by fabina »

Hello Flare users, we need your support. We have different settings for the head and body of dropdowns: one with a grey background, another with a white background. So far we have created a CHM help and it worked by specifying the following in the stylesheet for drop-downs with white background:
-------------------------------------------------- --------------------------------------------------
MadCap|dropDown.WhiteBackground > MadCap|dropDownHead,
MadCap|dropDown.WhiteBackground > MadCap|dropDownBody
{
background-color: #ffffff;
padding-left: 0;
padding-right: 0;
}
-------------------------------------------------- -------------------------------------------------- ---
In the HTML5 help, the implementation is displayed as desired in the XML editor, but not in the preview and in the compiled help :cry: .

Does anyone know the problem and have a solution for it?
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: How can you implement different styles for drop downs?

Post by NorthEast »

The problem is that you can't use MadCap| styles with any 'advanced' CSS using complex selectors; so you can't use child selectors like MadCap|xxx > MadCap|xxx { }

They work in the editor because the source files inclue <MadCap> tags in the HTML.
But in the output, all the MadCap tags in the source are converted to real HTML tags, so there are no <MadCap> tags or MadCap| CSS styles used in the output.

So, to use any 'advanced' CSS, you have to write the CSS based on the output. Use your browser tools to inspect the HTML/CSS in the output, and write your CSS based on the tags/classes that you see there; for example:

Code: Select all

.dropDown.WhiteBackground > .dropDownHead,
.dropDown.WhiteBackground > .dropDownBody
{
}
This will display fine in the output and preview, but will not show in the editor.
Post Reply