I have a webpage with a header, a footer, and a container id="item"
that contains a list of four items with their respective logos. I am attempting to make the item
container responsive based on the screen size so the entire page fits the screen without requiring scrolling, regardless of the screen size.
However, I am uncertain how to achieve responsiveness for the item
container and its logos based on the screen size. I have experimented with various options, but none of them seem to be working perfectly.
This is what I've done so far. I appreciate any suggestions you may have:
To view the code, click on this link.
html,
body {
width: 100%;
height: 100%;
min-height: 100%;
background: #66B34E;
color: #efefef;
}
.container {
max-width: unset;
}
.title {
background: #187be1;
padding: 20px;
width: 100%;
font-size: 11px;
color: aliceblue;
bottom: 0px;
right: 0px;
left: 0px;
text-align: center;
text-decoration: none;
margin-top: 7px;
margin-bottom: 50px;
}
.list {
max-height: 60%;
max-width: 100%;
}
.menu {
background: #f8f8f8;
border-radius: 0;
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
padding: 20px;
width: 100%;
font-size: 11px;
color: black;
bottom: 0px;
right: 0px;
left: 0px;
text-align: center;
text-decoration: none;
}
.footer {
position: fixed;
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
left: 0;
bottom: 0;
right: 0;
width: 100%;
background-color: #434A54;
text-align: center;
font-size: 12px;
padding-top: 7px;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container title"><br>This is the header<br><br></div>
<div class="container list" id="item">
<div class="container">
<div class="row">
<div class="col-6 menu"> <img src="https://www.google.co.uk/images/srpr/logo11w.png"/> <br>
Item 1
</div>
<div class="col-6 menu"><img src="https://www.google.co.uk/images/srpr/logo11w.png"/><br>
Item 2
</div>
</div>
<div class="row">
<div class="col-6 menu"><img src="https://www.google.co.uk/images/srpr/logo11w.png"/><br>
Item 3
</div>
<div class="col-6 menu"><img src="https://www.google.co.uk/images/srpr/logo11w.png"/><br>
Item 4
</div>
</div>
</div>
</div>
<div class="container footer"><br>
This is the footer<br>
</div>