Jump to content

Adjusting height of shape with CSS

Recommended Posts

I added a shape block (square). I stretched it the length of five columns. The width takes up one row in fluid engine. Is there way to adjust the height even further with CSS? I want to make it a tiny bit smaller than the row's height. The block ID for this shape is #block-b5d7e589e9a6b031b262.

Thanks!

Link to comment
  • Replies 6
  • Views 320
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

8 hours ago, LukeDesign said:

I added a shape block (square). I stretched it the length of five columns. The width takes up one row in fluid engine. Is there way to adjust the height even further with CSS? I want to make it a tiny bit smaller than the row's height. The block ID for this shape is #block-b5d7e589e9a6b031b262.

Thanks!

Can you share your URL so we can check it easier?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

With the fluid engine, you can change the row height of grid with section edition

image.thumb.png.1f88e8f7a4242746ea73fc70c0376b07.png

I think you can set the row height value as you want to setup the height for the shape block.

If you want to decrease the height of this block with CSS, you can try the following code

.fe-block-yui_3_17_2_1_1714568705767_918 {
  height: 20px;
}

Change the height with value as you want to archive

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
Posted (edited)

Hey,

yes, something like this should work:
 

#block-yui_3_17_2_1_1714568705767_918
{top: 10px !important;}

so you can adjust the position. You can also do use "left", "right" 

and try  percentage e.g. 

 

Quote

height: 90%

 

Edited by ArminB

About Armin:
Squarespace Expert Profile: https://www.squarespace.com/designer/profile/3649084
Website: www.braunsberger-media.com
Leaders Lodge: See my Profile

Link to comment

Thank you @Beyondspace and @ArminB. Both worked perfectly. I want to fix the shape so it doesn't move around when a user adjusts their browser window. I tried a couple codes but no luck. Below is the code I am using to adjust the height of the shape as well as the positioning within the row (note that I have a new block ID from my original post). Thanks again!

#block-559b2a20ec544f218aa9{
  height: 18px;
}

#block-559b2a20ec544f218aa9
{top: 10px !important;
}

 

 

 

 

Link to comment

Bumping this back up. Still trying to add the correct CSS so these shapes don't move around when the desktop browser is resized.

The goal is create a rectangle border around the text content. I am going for an overlap effect over the sections so the rectangle appears it is overlapping with the section underneath it. Multiple sections and background shapes were created for the illusion. 

To make it more clear on what is happening, I changed the color of some of the shapes:

https://www.lucasano.com/invitations#experience

The white vertical (left and right) shapes were created with a code block. The horizontal (top and bottom) shapes were added with Squarespace shape blocks. 

The top part of the rectangle is fine, it's the bottom that is shifting. Here is the code I currently have for this:

Top horizontal shape
*/
#block-719cb3b717a5833a9a95{
  height: 18px;
}
/*
Bottom horizontal shape
*/
#block-9d9c45c1a8a3313b0308{
  height: 18px;
}

/*
Bottom Yellow vertical shapes (short)
*/
@vertLineShortThickness: 18px;

#siteWrapper .code-block .sqs-block-content {
  position: unset;
}
.code-block .vert-line-short {
  height: 12px;

  &:before {
    content: '';
    position: absolute !important;
    height: 210%;
    width: @vertLineShortThickness;
    background: #CE9D54 !important; /* Added !important */
    left: 50%;
    transform: translateX(-50%);
    	/* Make vertical for mobile */ 
    @media screen and (max-width: 767px) {
      height: @vertLineShortThickness;
      width: 100%;
    }
  
  }
}

 

 

 

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.