Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-04-27 17:58:42
- alex9142
- Member
- Registered: 2008-03-17
- Posts: 45
a bigger line-height (only in the posts)
Hi!
I would like to enlarge the space between the lines of the published texts. I tried to add it in the CSS, in different places, but the texts remains the same. Where do I need to add the line-height, please?
Offline
Re: a bigger line-height (only in the posts)
.entry-content p {
line-height: 160%
}
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
#3 2008-04-27 20:58:15
- alex9142
- Member
- Registered: 2008-03-17
- Posts: 45
Re: a bigger line-height (only in the posts)
Hi Trec!
Thank you very much, brother!
Offline
Re: a bigger line-height (only in the posts)
Another tip would be to add dynamic CSS classes by using txp:if_single_article declarations in the article form markup. This is useful if you use one article form for article lists and single articles.
Markup (wrapped for better reading)
<div class="article_body
<txp:if_single_article>big_interleaf single_article
<txp:else>standard_interleaf article_list</txp:if_single_article>">
<txp:article_image /><txp:body />
</div>
CSS
article_body for all the overlapping attributes
.article_body {}
.single_article {}
.article_list {}
.big_interleaf p {lin-height: 1,5em;}
.standard_interleaf p {lin-height: 1em;}
Those dynamic classes can be very powerful i.e. if you want to have a different image for different categories, sections or any other if/else template tag.
Last edited by merz1 (2008-04-28 09:02:03)
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: a bigger line-height (only in the posts)
merz1 wrote:
Another tip would be to add dynamic CSS classes by using txp:if_single_article declarations in the article form markup. This is useful if you use one article form for article lists and single articles.
Probably it’s better to use txp:if_individual_article
instead of the if_single_article ;)
Last edited by Gocom (2008-04-28 10:24:12)
Offline
#6 2008-04-28 18:07:31
- alex9142
- Member
- Registered: 2008-03-17
- Posts: 45
Re: a bigger line-height (only in the posts)
This is another great tip too!
Thank you, merz1 !
Offline