Is there a way to create a style based on multiple tags?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
TomTatham
Jr. Propeller Head
Posts: 9
Joined: Sat Jul 21, 2007 12:28 pm

Is there a way to create a style based on multiple tags?

Post by TomTatham »

Is there a way to create a style that combines several other styles?
For example, I would like to have a style called "Block1X_Pre" that would be defined as:
<blockquote><pre></pre></blockquote>

and another style named "Block2X_Pre":
<blockquote><blockquote><pre></pre></blockquote></blockquote>

If this can't be done with styles per se, is there some other way within the XML editor to apply a set of styles to some content?

I have a feeling there is an obvious answer, but I am rather new to both XML and Flare.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Is there a way to create a style based on multiple tags?

Post by RamonS »

What makes me a bit confused (OK, more confused than I already am) is why you want to apply styles to the <pre> tag. The purpose of the <pre> tag is to not apply any styling to it as that section is already pre-styled. Since you want to use a blockquote I'd craft the contents of the <pre> tag so that they appear as desired. Again, the <pre> tag tells the browser to keep its paws off your stuff.
TomTatham
Jr. Propeller Head
Posts: 9
Joined: Sat Jul 21, 2007 12:28 pm

Re: Is there a way to create a style based on multiple tags?

Post by TomTatham »

The pre tag is used in my topics to present computer code examples that can be cut-and-pasted into a text editor. If the pre tag is not used, extraneous linefeed/carriage returns get inserted into the text file. If the pre tag is used alone, everything is lined up along the left margin. I would like to be able to have more control over the positioning of my code examples. I could manually enter multiple blockquotes and then pre tags, but I am looking for a faster and more elegant approach to my problem.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Is there a way to create a style based on multiple tags?

Post by KevinDAmery »

I haven't tried this so it may not work, but have you tried adding a margin-left attribute to a pre tag class?
Until next time....
Image
Kevin Amery
Certified MAD for Flare
TomTatham
Jr. Propeller Head
Posts: 9
Joined: Sat Jul 21, 2007 12:28 pm

Re: Is there a way to create a style based on multiple tags?

Post by TomTatham »

Thanks; it works. I was thrown off in the style sheet editor by the "show relevant assorted properties" filter. For pre tags, the filter only displays font properties. Thus, I thought that Box properties could not be associated with pre tags and I did not even try to do so. I wonder if other users have been confused by the meaning of this filter. (Actually I am still not sure what is intended by the filter -- clearly Box IS a relevant property!).
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Is there a way to create a style based on multiple tags?

Post by KevinDAmery »

I switched to Show All Properties for that reason - there were parameters available that aren't shown in relevant properties. I think the intent is to show properties that are most frequently used with that tag... but that doesn't mean they're most relevant to a particular writing project.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
Post Reply