Jump to content

How can I remove padding or borders from the code block?

Recommended Posts

Site URL: https://www.faune.co/


How can I remove padding or borders from the code block? 

I am currently using a code block to create a vertical line across the middle of my page (to divide it into two columns) but I would like the block to be just 1 pixel wide, which is the same as the line. Is there a way to do this? This page isn't published yet, but this is the block ID: #block-yui_3_17_2_1_1620062550788_4645

This is the code I am using to create the line in the code block:

<div class="vertical-line"></div>


and the code I am using in the custom css editor

.vertical-line {
  height: 1650px; /* line height */
  width: 1px; /* line width */
  background: #a8a6a1; /*line colour*/
  margin-right: auto;
  margin-left: auto;


Unless there is an easier way to divide your page with a vertical line?

Thank you so much!


Link to comment
  • Replies 3
  • Views 728
  • Created
  • Last Reply
On 5/16/2021 at 10:18 PM, FauneJournal said:

Hi @tuanphan

Thanks for your reply. The post is work in progress and it's not live yet.

But here is a screenshot if that helps?

Because of the padding on the code blocks, my columns are not even in size and that's why I would like to get rid of the padding on each side of the code block. 

Screenshot 2021-05-16 at 16.26.28.png

Hi. Whe you're done, share page url, we can help easier

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


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.