Jump to content

Setting custom size for Markdown blocks so that the content doesn't dictate the height of the block

Recommended Posts

I'm using markdown blocks to add text that has a different color background for a series copy (see attached).  I'm trying to set each block so the heights are the same.  I'm able to space things out left and right and align the tops with the standard block dimensions, but can't seem to find code to adjust the block sizes themselves so that the bottoms will also be aligned.

 

Here is an example what I have so far for my markdown:

 

<div style="background-color:rgba(0, 0, 0, 0.0470588); text-align:center; vertical-align: middle; padding:30px 30px;">
  
####  **JANUARY **
 *FRESH START CLEAN HOME*

• Genesis Hand & Body Lotion - 21.75 PV ($21.75)

• Grapefruit Oil - 18 PV ($18)

• Orange Oil - 11.5 PV ($11.50)

#### **Total: 51.25 PV ($51.25)**

 

Thanks,

Matt

 

 

 

image.thumb.png.24e667412a463910b3a66eb4de53a24c.png

Link to comment
  • Replies 3
  • Views 1.4k
  • Created
  • Last Reply

Could you share use your current url?

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

Replace all boxes with Markdown Block.

3 row of boxes = 3 Markdown Blocks (1 Markdown = 4 boxes)

1. Use this syntax. (Don't remove ###### END)

> #### JANUARY
> *FRESH START CLEAN HOME*
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
> #### Total: 1000$
###### END
> #### FEB
> *FRESH START CLEAN HOME*
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
>
> #### Total: 1000$
###### END
> #### MARCH
> *FRESH START CLEAN HOME*
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
>
> #### Total: 1000$
###### END
> #### APRIL
> *FRESH START CLEAN HOME*
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
>
> • Genesis Hand & Body Lotion - 21.75 PV ($21.75)
>
> #### Total: 1000$

2. Add a Code Block under 3 Markdowns

<style>
.markdown-block>div {
    display: flex;
}
.markdown-block blockquote {
    width: 33.33%;
    background-color: rgba(0, 0, 0, 0.0470588);
    padding: 30px;
    text-align: center;
}
.markdown-block blockquote {
    width: 33.33%;
    background-color: rgba(0, 0, 0, 0.0470588);
    padding: 30px;
    text-align: center;
    margin: 10px !important;
}
  #end {display: none;}
</style>

Demo Page

(Pass: abc)

image.thumb.png.f19443cd995b39eb2dc9c47ad2ac16b5.png

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

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.