HelenScott Posted December 10, 2019 Share Posted December 10, 2019 I need help designing the pricing table attached. I have got the following code but would like the grey box on the left to be the same height as the box on the right. It works for mobile but on tablet and above it looks uneven. Is this possible in CSS. code: <div class="st-price-section"> <div class="st-price-columns"> <ul class="st-price-price"> <li class="st-price-header">heading one</li> <li class="grey"><a class="st-button">$</a></li> <li>line 1</li> <li>line 2 </li> <li>line 2 </li> </ul> </div> <div class="st-price-columns"> <ul class="st-price-price"> <li class="st-price-header">heading 2</li> <li class="grey"><a class="st-button">$</a></li> <li>line 1</li> <li>line 2 </li> <li>line 3 </li> <li>line 4 </li> <li>line 5 </li> </ul> </div> </div> <style> .st-price-section * {box-sizing: border-box; } .st-price-columns {width: 50%;padding: 8px; float: left; grid-auto-rows: 2fr; } .st-price-price {list-style-type: none; margin: 0;padding: 0;text-align: center;-webkit-transition: 0.3s; transition: 0.3s;} .st-price-price:hover {box-shadow: 0 8px 12px 0 rgba(0,0,0,0.2)} .st-price-price .st-price-header {background-color: #e0474c;color: white;font-size: 26px; font-weight: 700; text-align: center; text-transform: uppercase} .st-price-price li {padding: 5px;background-color: #F1EFED; color: #444040; } .st-price-price .grey {background-color: #444040;font-size: 22px;font-weight: 700;} .st-button {border: none;color: white;padding: 10px 25px;text-align: center;text-decoration: none;font-size: 26px;} @media only screen and (max-width: 925px) {.st-price-columns {width: 50%;} } @media only screen and (max-width: 600px) {.st-price-columns {width: 100%;} } </style> Link to comment
tuanphan Posted December 10, 2019 Share Posted December 10, 2019 You should share link to your site. Just looking at the code, very time-consuming, will limit other from answering. Not related, you can use Text Block + CSS to create Pricing Tablet. You can easily edit everything. I did for a client a month ago. 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
HelenScott Posted December 10, 2019 Author Share Posted December 10, 2019 Yep - it is done via the code block - it is on a trial page so can't share. Link to comment
paul2009 Posted December 10, 2019 Share Posted December 10, 2019 The code from this article: https://www.spacetutorials.com/pricing-table which is adapted from this W3Schools article: https://www.w3schools.com/howto/howto_css_pricing_table.asp Neither has been built to take advantage of the built-in responsive features of Squarespace. About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥. Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links. Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.