Jump to content

Custom line height in blog title

Go to solution Solved by Ziggy,

Recommended Posts

Site URL: https://www.provocativo.com/news

Hi there,

I'm working on trying to match my blog title's line height to the ones on the rest of the site. The problem is I can't seem to get it tighter than attached example.  On the homepage the line height scales along nicely when decreasing font size with CSS, but not with blog titles. Any help would be super appreciated!

CSS used:

/* CSS FOR MOBILE */
@media only screen and (max-width: 767px) {
/* Start Insert Code for Mobile*/

// Header h1
 h1 {font-size:4rem !important} 

// Header h2
 h2 {font-size:2.8rem !important} 

// Header h3
 h3 {font-size:2.3rem !important} 

// Paragraph
 p {font-size:1rem !important} 

// blog list //
h1.blog-title a {
  font-size: 2.8rem !important;
  line-height: 1rem !important;}
 
// blog pagination //
.item-pagination-title {font-size: 1.2rem !important;}  
}

example.jpg

Link to comment
  • Solution

Try this Custom CSS:

.blog-basic-grid .blog-title {
  line-height:1.1rem !important;
}

 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
4 minutes ago, Sahil007 said:

Woooow, that did the trick! Thank you so much for your help!! 🙌 🙌 🙌

No problem, can you mark my reply as the answer to your question to help others in the future? Thanks!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
  • 10 months later...

@Ziggy, I'm having the same issue as this one that you solved last year - the line spacing in my blog titles is too large, both as they appear in listings on my blog page and in each individual blog entry. 

I'm a newbie, and not sure where to put that CSS code you recommended.  I've got 7 blog posts on my site now, and I plan to continue adding one every week or two.  Can I just insert a Code Block in the main blog page?  Do I need to insert a Code Block with your recommended code on each blog I write?

Please help.

Thanks in advance!

Link to comment

@PBJim You can add that code via Website -> Website Tools (scroll to the bottom) -> Custom CSS.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
16 hours ago, PBJim said:

Thank you very much!

You're welcome.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.