Jump to content

Create a rectangle with only a border that automatically resizes

Recommended Posts

Hello,

I'm trying to create a rectangle transparent background with only a border that the user could resize in the fluid engine easily (without having to note its size by hand in the code and find the # of the block) 

 

So far I have done this: 

 

Custom code HTML :

<div id="square"></div>

 

CSS :

#square {
    width: 100%;
    height: 100%;
    background-color: transparent;
    border : 2px solid red;
  }

square.thumb.jpg.a4eb1c834433a9b4ea51484673d978dd.jpg

 

The width follows well (it fills the entire width). But not the height.

Do you have an idea ? A particular class to add to my div maybe?  Or better option ?

Thank you very much! 

 

Page : https://vanilla-yellow-j6gf.squarespace.com/test

Password: demo 

PS: Sorry for my bad English. It's google translate haha.

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

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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.