[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 618
  • Last Modified:

drupal 7 different font weight in teaser and node

I have a teaser to a node. The first line of the node appears in the teaser.
How can I arrange for the text in this line be bold and h2 in the node but normal weight and size in the teaser?
0
bogorman
Asked:
bogorman
1 Solution
 
HagayMandelCommented:
Use field_formatter_class
It allows you to add css class to each field (and in D7 'Body' is a field as well), and have different classes to 'Full body' & 'Teaser'.
So you add a custom class to the tease let's call it 'my_teaser', and then add the required css to the theme's css file accordingly:

.my_teaser {
 font-weight:bold;
 font-size: 16px;
}
0
 
bogormanAuthor Commented:
Thanks, HagayMandel, works perfectly.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now