Jump to content

CSS help!

Recommended Posts

Hi I need help modifying my current css code so that Heading 2 is set to center or will at least allow me to center it without css. This is my current code:

h2 {
    display: inline-block !important;
    box-shadow: inset 0 -0.18em 0 #51F5C1;
    -webkit-box-shadow: inset 0 -0.18em 0 #ea1d26;

}

 

I need the the underlined word "Explore" to move to the center of the page. I would prefer that I be able to use the native align functionality in Squarespace however this will default to left align no matter what I do.

Css.PNG

Link to comment
  • Replies 3
  • Views 386
  • Created
  • Last Reply

One option is to use a Markdown Block and then use two 'spacers' to center the Markdown block within the page section. 

<style>
.underline {
  text-align: center;
  text-decoration: underline; 
  text-decoration-style: solid;
  text-decoration-color: #ea1d26;
  }
</style>
<div class="underline">
<h2>EXPLORE</h2>
</div> 
 

One issue is the Markdown version does not allow to you to define the thickness of the underline ( text-decoration-thickness: 10px)

mcgouran.john@gmail.com

Link to comment

Archived

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

×
×
  • 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.