Jump to content

Make Vertical Line Grow with Page

Recommended Posts

I'm attempting to create a vertical line that changes as the page length changes. However, when I set the line height to 'auto' or '100%' it just completely disappears. How do I make the height of the line be the height of the page?

I created the line by adding a code block on my page with the following: <div class="vertical-line"></div>

And then added Custom CSS of the following:

/* Vertical Line */
.vertical-line {
  height: auto !important; /* line height */
  min-height: 2000px;
  width: 1px; /* line width */
  background: hsl(31, 86%, 50%); /*line colour*/
  margin-right: auto;
  margin-left: auto;

Link to comment
  • Replies 1
  • Views 275
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.