Sharing.....
If, like me, you have a <p> style with a fontsize that is a different size than the regular - like 0.9em
and you want to apply that paragraph within a list item,
the list items become 0.9 of 0.9 in size as there is inheritance at work!
To solve it I have created a p.FollowLi class and applied the font size of 1em
This has to be used within lists if paragraphs are wanted in the individual list items.
paragraphs in list items
Re: paragraphs in list items
Why not set it to 1em, so you never have this problem?
I'd suggest setting the font size you use in regular text (like paragraphs) on your body tag; e.g. if body is set to 14px, then that means 1em = 14px.
Then all normal text (paragraphs, etc.) can be set to 1em, and anything that needs to be larger (headings, etc.) can be 1.5em, 2em (in relation to your 1em size).
I'd suggest setting the font size you use in regular text (like paragraphs) on your body tag; e.g. if body is set to 14px, then that means 1em = 14px.
Then all normal text (paragraphs, etc.) can be set to 1em, and anything that needs to be larger (headings, etc.) can be 1.5em, 2em (in relation to your 1em size).
Re: paragraphs in list items
Hi Dave
That is a good suggestion - thanks.
It stems from the days when I did not know how Flare worked and I had set my body font size to 1em, finding that it was too big for what I wanted, so I set my <p> size to 0.9em.
Live and learn - I spent some time setting <body> to an actual size: Arial 11pt, adjusted the affected styles and now there's no need for the p.FollowLi
It's not working quite as I want to in the TOC, but it's easier to tweak that level for level.
Great! Live and Learn!!
That is a good suggestion - thanks.
It stems from the days when I did not know how Flare worked and I had set my body font size to 1em, finding that it was too big for what I wanted, so I set my <p> size to 0.9em.
Live and learn - I spent some time setting <body> to an actual size: Arial 11pt, adjusted the affected styles and now there's no need for the p.FollowLi
It's not working quite as I want to in the TOC, but it's easier to tweak that level for level.
Great! Live and Learn!!
-
doc_guy
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Re: paragraphs in list items
If you use a complex selector, you should also be able to deal with this on the back end.
If you want the P inside the LI to act differently than the regular P then you do the following:
You can add whatever style you want, but this way, paragraphs inside a LI will get the style specified above, which can be different from the default paragraph style.
If you want the P inside the LI to act differently than the regular P then you do the following:
Code: Select all
p {
font-size:1em;
}
li p {
font-size:.8em;
}
