Is there a way to limit the background of a heading?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
ktbCA57
Sr. Propeller Head
Posts: 483
Joined: Wed Feb 04, 2009 7:45 am

Is there a way to limit the background of a heading?

Post by ktbCA57 »

I am using a very light background behind a header/heading style. However, the background goes all the way across the window. Is there a way to limit the background to only be as long as the line of text?


limting background.png
You do not have the required permissions to view the files attached to this post.
Psider
Propellus Maximus
Posts: 902
Joined: Wed Jul 06, 2011 1:32 am

Re: Is there a way to limit the background of a heading?

Post by Psider »

You could try

Code: Select all

display: inline-block
.

But it could have some unwanted consequences (which I'm a little fuzzy on) so test carefully.
ktbCA57
Sr. Propeller Head
Posts: 483
Joined: Wed Feb 04, 2009 7:45 am

Re: Is there a way to limit the background of a heading?

Post by ktbCA57 »

sorry.. do i add that just to that style?

Thanks!
Chicago_HPT
Sr. Propeller Head
Posts: 133
Joined: Sun Feb 03, 2013 6:01 pm

Re: Is there a way to limit the background of a heading?

Post by Chicago_HPT »

Yes, you would add that to the style where you want that behavior. However, if you have several h1 styles (e.g. h1.toc, h1.topic, h1.ref) but you want that behavior for all of them, then add it to the base h1 element style and it wil "cascade" to the others.
Post Reply