Jump to content

Custom table widths

Recommended Posts

Posted

Site URL: https://www.jaiminee.com/

I followed this guide on how to insert a table into SS and I'm pretty happy with how it's turned out, but, with no prior knowledge of code, I don't know how to make sure all the columns are equal in size. Currently all the cells are set at 4px padding. Could anyone help? 

Thanks, 

Amy

 

Screenshot 2020-06-02 at 20.41.13.png

  • Replies 2
  • Views 709
  • Created
  • Last Reply
  • 1 month later...
Posted

Hi @tuanphan

I managed to figure it out with this code: 

//TABLE CM+INCHES//


.grid-container{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr 1fr;
    width: 100%;
    height: 200px;
    border: 1px solid #000000;

}
.empty{
    background-color: white;
    grid-column-start: 1fr;
    border-bottom: 1px solid #000000;
    border-right: 1px solid #000000;
}
.size{
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #000000;
    border-right: 1px solid #000000;
    
}
.size-4{
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #000000;
}
.body-pos{
    display: flex;
    font-weight: bold;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #000000;
    border-right: 1px solid #000000;
}
.body-pos-2{
    display: flex;
    font-weight: bold;
    justify-content: center;
    align-items: center;
    border-right: 1px solid #000000;
}
.number{
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #000000;
    border-right: 1px solid #000000;
}
.number-1{
    display: flex;
    justify-content: center;
    align-items: center;
    border-right: 1px solid #000000;
}
.number-2{
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #000000;
}
.number-3{
    display: flex;
    justify-content: center;
    align-items: center;  
}
 

Archived

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.