Jump to content

Editing all H2 Headings

Recommended Posts

I want to edit all H2s.

h2 {font-size: 2.3rem !important;} does not work. It will only work if I assign the block like this...

#block-897e667f1a0639ee03e5 h2 {font-size: 2.3rem !important;}

How can I apply to h2's site wide. I would be using this in various media queries for mobile sizes.

Thanks

Link to comment
  • Replies 1
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

If you share site link to page where you use h2, we can check easer (maybe you have another code with higher priority, affects on h2)

If you can't share site, you can use this code to Code Injection > Footer to set CSS inline

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
jQuery(document).ready(function($){
  $('h2').attr('style','font-size:2.3em!important;');
})
</script>

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.