The problem is want to make even height for all columns, if i'm using various contents for each columns. I want to know how to fix the even height for 4 columns. I've tried to fix the height all columns with all the device models but some device would be aligned properly, rest of the devices not aligned. Can you please suggest me where I made mistake in my code?
HTML:
<!DOCTYPE html>
<html>
<head>
<title>NXT-255</title>
<link rel="stylesheet" type="text/css" href="test.css">
</head>
<body>
<div class="row">
<div class="header">
<h1>This is test</h1>
<p>description description description</p>
</div>
<div class="features">
<div class="item">
<h1>This is test</h1>
<p>description description description</p>
</div>
<div class="item">
<h1>This is test</h1>
<p>description description description</p>
</div>
<div class="item">
<h1>This is test</h1>
<p>description description description</p>
</div>
</div>
</div>
</body1>
</html>
CSS:
div.header{
float: left;
min-height: 260px;
background-color: gray;
padding: 10px;
width: 20%;
}
div.features{
display: flex;
min-height: 260px;
padding: 10px;
background-color: lightblue;
}
div.features .item{
flex: 1;
font-size: 20px;
padding-top: 20px;
padding-bottom: 20px;
width: 20%;
}
@media screen and (min-width: 920px) and (max-width: 1240px){
div.header{
float: left;
min-height: 260px;
background-color: yellow;
padding: 10px;
width: 33%;
}
div.features{
display: flex;
min-height: 260px;
padding: 10px;
background-color: lightblue;
}
div.features .item{
flex: 1;
font-size: 20px;
padding-top: 20px;
padding-bottom: 20px;
width: 33%;
}
}
@media screen and (min-width: 620px) and (max-width: 919px){
div.header{
float: left;
min-height: 260px;
background-color: gray;
padding: 10px;
width: 33%;
}
div.features{
display: flex;
min-height: 260px;
padding: 10px;
background-color: lightblue;
}
div.features .item{
flex: 1;
font-size: 20px;
padding-top: 20px;
padding-bottom: 20px;
width: 33%;
}
}
@media screen and (min-width: 520px) and (max-width: 619px){
div.header{
float: left;
min-height: 260px;
background-color: green;
padding: 10px;
width: 33%;
}
div.features{
display: flex;
min-height: 260px;
padding: 10px;
background-color: lightblue;
}
div.features .item{
flex: 1;
font-size: 20px;
padding-top: 20px;
padding-bottom: 20px;
width: 33%;
}
}