How can I adjust the height of my sidebar block to match the height of the sidebar main block and the content block?
Check out this example image I created:
https://i.sstatic.net/qFIxe.png
I'm currently using Bootstrap 4 and have experimented with grid/flexbox and relative/absolute positioning (making the sidebar absolute and the container relative). However, I'm struggling to set a percentage height on the blocks as they do not seem to respect it.
What is the best way to achieve this alignment?
Below is an example of my attempt using relative and absolute positioning (the original code is in PHP)
<div class="row position-relative">
<div class="col-md-3 p-0"></div>
<div class="col-md-3 p-0 position-absolute h-100">
<div class="d-none d-md-block">
<div id="boxsubmenu">
<div class="level_0">
BLOCK 1 <-----
<a href="{CATALOG_LINK}" class="level_0">{TPL_LAN.LBL_CAT_MENU_TITLE}{MENU4.LABEL}</a>
<div>
<div class="level_{MENU.LEVEL} {MENU.SELECTED} {MENU.LAST}">
<a href="{MENU.LINK}" class="{MENU.SELECTED}">{MENU.LABEL}</a>
</div>
<div class="level_{MENU.LEVEL} {MENU.SELECTED} {MENU.LAST}">
<a href="{MENU.LINK}" class="{MENU.SELECTED}">{MENU.LABEL}</a>
</div>
<div class="level_{MENU.LEVEL} {MENU.SELECTED} {MENU.LAST}">
<a href="{MENU.LINK}" class="{MENU.SELECTED}">{MENU.LABEL}</a>
</div>
<div class="level_{MENU.LEVEL} {MENU.SELECTED} {MENU.LAST}">
<a href="{MENU.LINK}" class="{MENU.SELECTED}">{MENU.LABEL}</a>
</div>
</div>
BLOCK 2 <-----
<a href="{CATALOG_LINK}" class="level_0">{TPL_LAN.LBL_CAT_MENU_TITLE}{MENU4.LABEL}</a>
<div>
<div class="level_{MENU.LEVEL} {MENU.SELECTED} {MENU.LAST}">
<a href="{MENU.LINK}" class="{MENU.SELECTED}">{MENU.LABEL}</a>
</div>
<div class="level_{MENU.LEVEL} {MENU.SELECTED} {MENU.LAST}">
<a href="{MENU.LINK}" class="{MENU.SELECTED}">{MENU.LABEL}</a>
</div>
<div class="level_{MENU.LEVEL} {MENU.SELECTED} {MENU.LAST}">
<a href="{MENU.LINK}" class="{MENU.SELECTED}">{MENU.LABEL}</a>
</div>
<div class="level_{MENU.LEVEL} {MENU.SELECTED} {MENU.LAST}">
<a href="{MENU.LINK}" class="{MENU.SELECTED}">{MENU.LABEL}</a>
</div>
</div>
BLOCK 3 <-----
<a href="{CATALOG_LINK}" class="level_0">{TPL_LAN.LBL_CAT_MENU_TITLE}{MENU4.LABEL}</a>
<div>
<div class="level_{MENU.LEVEL} {MENU.SELECTED} {MENU.LAST}">
<a href="{MENU.LINK}" class="{MENU.SELECTED}">{MENU.LABEL}</a>
</div>
<div class="level_{MENU.LEVEL} {MENU.SELECTED} {MENU.LAST}">
<a href="{MENU.LINK}" class="{MENU.SELECTED}">{MENU.LABEL}</a>
</div>
<div class="level_{MENU.LEVEL} {MENU.SELECTED} {MENU.LAST}">
<a href="{MENU.LINK}" class="{MENU.SELECTED}">{MENU.LABEL}</a>
</div>
<div class="level_{MENU.LEVEL} {MENU.SELECTED} {MENU.LAST}">
<a href="{MENU.LINK}" class="{MENU.SELECTED}">{MENU.LABEL}</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-9">
<div class="row">
<div class="col-xs-12 p-5 col-md-9" style="width: 100% !important;">
{PAGE_CONTENT}
</div>
</div>
</div>
</div>