0

I have two columns (using Wordpress #Primary and #Secondary) that have varied length of content for each page. Each column has its own background style, one is a gradient (#primary), the other a background image (#Secondary).

When each column has a different amount of content height wise, the gradient or image only goes down to the content in the column.

How do I get the column styles to be 100% of the height of the longer column?

gwmbox
  • 123
  • 3
  • 13

1 Answers1

1

Use flex.

.container {
  border: 2px solid green;
  padding: 20px;
  display: flex;
}

.container>div {
  border: 1px solid black;
  background: #ececec;
  padding: 10px;
  margin-left: 10px;
  flex: 1;
}
<div class="container">
  <div>Div 1 Div 1Div 1Div 1Div 1Div 1Div 1Div 1Div 1Div 1Div 1Div 1Div 1Div 1Div 1Div 1Div 1Div 1Div 1Div 1Div 1</div>
  <div>Div 2</div>
</div>
K K
  • 17,794
  • 4
  • 30
  • 39