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
  • Created
  • Last Reply

Top Posters In This Topic

Could you share use your current url?

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, 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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.