condition on <div> tag

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
jbananak
Propeller Head
Posts: 68
Joined: Thu May 03, 2012 2:45 am

condition on <div> tag

Post by jbananak »

Hi
I have a div tag (div.keeptogether_screenonly) which contains content that should only be displayed for online targets, meaning that I always set a condition on this tag .screenonly.

Is there a way to include the condition in the style definition (in the css) so that as soon as I group a block of content with this division tag it will already have the condition (and only show up for online output)?
Thanks
Joanna
devjoe
Sr. Propeller Head
Posts: 342
Joined: Thu Jan 23, 2014 1:43 pm

Re: condition on <div> tag

Post by devjoe »

Assuming that the alternative, where you don't want the div to appear, is a print-type output like Word or PDF, you can use media specifications in the CSS to set display: none; on this class and it won't show there.

In your print target, on the Advanced tab, there is a Stylesheet Medium which specifies which medium in your style sheet is applied when it generates that output.
In the stylesheet editor you can select the medium from the fields in the second row (not the top toolbar, but the fields below that). Select this medium, then select your style, then under Block (if you are viewing the stylesheet by property groups) you can find display, and set it to none.
jbananak
Propeller Head
Posts: 68
Joined: Thu May 03, 2012 2:45 am

Re: condition on <div> tag

Post by jbananak »

Thank you devjoe. That should solve the problem.
Joanna
Post Reply