Jump to content

Archived

This topic is now archived and is closed to further replies.

tiltcreative

How to specify that a specific header uses the primary text font instead of header font

Recommended Posts

tiltcreative    0
tiltcreative

Hi, I am wondering how I can specify that my h2 head use the font that is used for text rather than the font used for headers.

I know I can specify the font name itself, but I just want to make it use whatever I've selected in the primary text global settings, so if I change that the h2 will just follow along.

How would you do that in css?

 

Thanks for your help.

Share this post


Link to post
Share on other sites
ellenmva    112
ellenmva

It's actually LESS code so put this in your Custom Code -> Custom LESS/CSS box on your site or in your child theme style.less file. @plBaseFont is the variable set from Typography - Primary Font.

h2 {
  font-family: @plBaseFont;
}


Ellen Moore

Pagelines Developer

www.elsue.com www.betterdms.com

Share this post


Link to post
Share on other sites
tiltcreative    0
tiltcreative

Thank you! What is the variable set of the header font?

Share this post


Link to post
Share on other sites
Rob    547
Rob

Go to your site, logged in as admin, then viewing the homepage.  Click on the Global Options and then on the left menu, click Typography.   The Header fonts are the ones on the right. Select one from the drop down selector.  Save by clicking Publish.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
ellenmva    112
ellenmva

tiltcreative When you set the primary font under Global Options -> Typography that option is saved to a LESS variable @plBaseFont which is used in DMS LESS (like CSS but better). So by using my code above you are telling the h2 selector to use the font selected for primary font in Global Options -> Typography.

 

Hope that clarifies a bit. If you want to know more let me know and I will point you to some articles on LESS and variables used in particular in DMS.

 

Ellen


Ellen Moore

Pagelines Developer

www.elsue.com www.betterdms.com

Share this post


Link to post
Share on other sites
Rob    547
Rob

@ellenmva  Thanks for helping!


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

  • Similar Content

    • Barnaby Skinner
      By Barnaby Skinner+
      Hey all, hope I worded the topic correctly!
      I just need to know if either 1) I'm making a mistake or 2) this could be set as a new feature?
      Using the global settings typography parameters, I have a global paragraph font type (set using googlefonts) and have set the style to align:justify. When laying out <p> text inside a simple TEXT module, the <p> text adheres to both the font type and justification. Perfect.
      Now, when I set <p> text inside the PARAGRAPH TEXT field within an ELEMENT module, the <p> text adheres to the font type, but not the justification. It's rather annoying as I like to fully justify para text across the board and tend to use Element modules instead of text boxes for various reasons. It also seems silly that some PARAGRAPH TEXT fields adopt global settings, whilst other don't.
      Or I'm doing it wrong :S
      Any help or advice is much appreciated!
      Cheers
    • John Olsson
      By John Olsson+
      Hello,
      I wondering (and custumers) when does Font Awesome 4.7 comes with an update of Pagelines?
    • Queue-it
      By Queue-it+
      Hi,
      I have the primary font family set to Arial. If I add another font (Open Sans), how do I change it only on a specific page? 
      I want to have Open sans only on one of my landing pages, but by default it will fetch Arial. Is there a way to change it without a plugin?
       

    • Skip
      By Skip+
      Hello
      I'm having problems with the Font not appearing correctly on a website.
      I've adjusted the font correctly with DMS (see screen shot) and saved it repeatedly yet it does not adjust the font in the website (see screen shot).  Would you please let me know what is wrong and should be done?
      (Please note that I've cleared the cache in the browser and whatnot as far as basic things I do know about browsers and issues with DMS from the past.  Hope this helps in troubleshooting...)
      Thank you.
      Skip


    • Barnaby Skinner
      By Barnaby Skinner+
      Hey all,
      I've been trying to justify the base font in PL5 with the Framework theme, but in doing so it's thrown a curve ball; it seems the font styling used by many of the PL5 Element sections (masthead etc) is overriding the global CSS.
      I set the base font style to justified in the Typography backend panel, and it seems to only apply to the base font used in standard Text sections, not to the base font used in text boxes within Element sections, could be others too, but not checked.
      Can we override this? It seems odd to have to (somehow) apply justification many times to different containers using the same base font, right?
      Also - I tried to add the CSS font-variant: small-caps; to the H3/4/5/6 CSS field in Typography panel, and again nothing happens, this time not even in Text sections!
      Confused I am! Please help...
      Cheers
      Barney
×