TonyN Posted March 29, 2020 Share Posted March 29, 2020 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. Link to comment
tuanphan Posted March 29, 2020 Share Posted March 29, 2020 Can you share link to your site? 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
JOHNMD Posted March 30, 2020 Share Posted March 30, 2020 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
TonyN Posted March 31, 2020 Author Share Posted March 31, 2020 @JOHNMD Thank you this worked for me. @tuanphan Thank you for checking in, appreciate you. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.