CSS: The issue of 100% height not functioning correctly for child elements within WordPress themes

I need assistance with creating three columns of equal height in WordPress using the WPBakery Builder and Minti Theme "Unicorn". Unfortunately, I can't provide the full code here. Can someone help me resolve this issue?

Here is a simplified version of what I have tried:

<body>
  <div class="site-wrapper wrapall">
    <div id="page-wrap">
      <div id="content" class="page-section nopadding">
        <div class="wpb_row vc_row-fluid standard-section section section-no-parallax space stretch">
          <div class="col span_12 color-dark left">
            <div class="vc_col-sm-12 wpb_column column_container col no-padding color-dark">
            <div class="wpb_wrapper">
              <div id="MYROW" class="vc_row wpb_row vc_inner vc_row-fluid EQUALHEIGHT">
                <div id="MYCOLUMN1" class="wpb_column vc_column_container vc_col-sm-4">
                  <div class="vc_column-inner">
                    <div class="wpb_wrapper">
                      ...content...
                    </div>
                 </div>
               </div>
                <div id="MYCOLUMN2" class="wpb_column vc_column_container vc_col-sm-4">
                  <div class="vc_column-inner">
                    <div class="wpb_wrapper">
                      ...content...
                    </div>
                 </div>
               </div>
                <div id="MYCOLUMN3" class="wpb_column vc_column_container vc_col-sm-4">
                  <div class="vc_column-inner">
                    <div class="wpb_wrapper">
                      ...content...
                    </div>
                 </div>
               </div>
             </div>
           </div>
         </div>
       </div>
     </div>
   </div>
</body>

My current CSS looks like this:

.EQUALHEIGHT .wpb_column,
.EQUALHEIGHT .vc_column-inner,
.EQUALHEIGHT .wpb_wrapper {
  height: 100%;
}

However, setting the height only works if I give #MYROW a fixed height. I want the parent's height to dynamically adjust based on its children. Does anyone know how to achieve this within the WPBakery Builder and Minti Themes environment?

If you have any suggestions or solutions, please let me know. Thank you!

Answer №1

After much searching, I have uncovered the answer:

.EQUALHEIGHT {
    display: flex;
    align-items: stretch;
    height: inherit;
}

.EQUALHEIGHT .vc_column_container,
.EQUALHEIGHT .vc_column-inner,
.EQUALHEIGHT .wpb_wrapper {
    display: flex;
    align-items: stretch;
    height: inherit;
}

Success - that solved the problem!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Mastering the art of jQuery scrolling: A step-by-step guide

Is there a way to utilize jQuery for scrolling purposes? For example, transforming this: <ul class="nav navbar-nav navbar-right"> <li class="active"><a href="#home">Home <span class="sr-only">(current)</span></a> ...

Typewriter Effect: The caret is advancing too quickly

I am trying to achieve a typewriter effect on my text, but the blinking cursor is extending further than the actual text. See Image for Problem Here is the code I am using: HTML: <div class="title"> <h1>Hi, I'm ConnerDE< ...

Tips for ensuring Marketo forms are responsive when integrated into a WordPress website

We are currently using Wordpress for our responsive website. Within the site, we have integrated Marketo forms (a marketing automation system) with custom CSS for styling. The issue we are facing is that while the forms appear fine on desktops, they cause ...

Customizing the background color in TurnJSIncorporating

Recently, I encountered a problem that has left me puzzled. Despite searching online for help, I have not been able to find a solution. The issue lies with the basic code provided on the official page of the TurnJS script. <div id="flipbook"> <di ...

Center align the label and textbox using CSS in a horizontal arrangement

Is there a way to center the label text within the div? My desired outcome is: ----------- Name: | textbox | ----------- For a demo, check out this code: http://jsfiddle.net/53ALd/2053/ ...

Display a div when hovering over another div

I have a menu that looks like this: https://i.sstatic.net/WqN33.png and I want to create a hover effect where another div shows up over each item, similar to this: https://i.sstatic.net/JRaoF.png However, I can't seem to figure out how to implemen ...

Exploring the possibilities of custom query pagination and Ajax in Wordpress

My Wordpress website has custom category and single pages with a unique query. The pagination is set up to load posts on the same page, which works fine on the homepage. The issue arises when trying to use pagination in single pages and categories using & ...

Leveraging SASS for injecting a variable into a mixin where the declaration is in string format

I have been developing a SASS mixin that allows for the input of various variables to construct a font-awesome declaration in the following format: @mixin after-font-awesome($unicode, $size, $margin, $color, $weight) { &:after { content:$unicode ...

Background image specifically for the Fullcalendar sun component

When setting a background image for Sunday in the month view, I noticed that the day "Sunday" in the header is also getting the same background. The CSS for the table thread has classes like .fc-sun and .fc-mon set as well, but I'm not sure how to rem ...

jQ identifying children with particular styling attributes

I am attempting to locate a child element that meets the following conditions: CSS visibility set to visible and CSS class assigned as foo There will always be only one element that meets these criteria at any given time var visibleBox = $('#parentE ...

CSS login validator immobilized

In my Visual Studio project, I am facing an issue with applying CSS to two requiredfield validators. I have tried using the following code: #vdtrUserLogin { top:65px; left:750; position:absolute} #vdtrPasswordLogin0 { top:65px; left:900; position:absolute ...

Minimizing lagging scroll movements while utilizing overflow-y: scroll;

I am currently working on a 2 column layout, where the right-hand column contains a scrollable list displaying a maximum of 200 items (implemented using a ul with overflow-y: scroll;). However, I have noticed that scrolling through the right-hand column i ...

A jquery class for styling with CSS

I am looking to add a CSS class to a gridview. I attempted to use this style from a reference link, so I implemented the following code snippet: $(function () { $('[ID*=search_data]').on('click', function () { var fromda ...

Is it possible in JQuery for the mouseup event to not be triggered if the left click button is held down for 10 seconds and then released suddenly, causing the mouse to move too quickly?

How to Move a DIV Inside Another Parent DIV Using Mouse Events in jQuery $(document).ready(function () { var drag = null; var Top = null; var Left = null; var O = $("#Outside").offset(); var outside ...

Is it possible for images to align vertically instead of horizontally in IE?

Encountering an issue with image alignment in Internet Explorer - they are aligning vertically instead of horizontally, while functioning correctly in all other browsers. Moreover, in IE8 and 7, the images are not being displayed at all. Is there a workaro ...

Eliminating padding from columns results in the appearance of a horizontal scrollbar

I needed to eliminate the padding from the bootstrap grid column classes. So I went ahead and did just that .col-x { padding: 0; } However, this action ended up causing the entire layout to break as a horizontal scrollbar appeared. I've put to ...

Ways to receive alerts when a marker enters a polygon

Looking for a way to receive notifications if my marker enters any of the polygons on the map. Having trouble implementing it correctly, here is my current code: <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com ...

What is the best way to search for a CSS selector that includes an attribute beginning with the symbol '@'?

Whenever I want to target an element with a click event, I usually use the following jQuery selector: $('div[@click="login()"]') <div @click="login()"> Login </div> However, when I tried this approach, it resulted ...

Create dynamic animations for HTML lists with seamless transitions

I am looking to create a smooth animation effect for an HTML list that moves from left to right and vice versa with a fixed length. The issue I am encountering is that when I click on the right button, it is replacing the list elements instead of animating ...