My webpage has three divs that I want to stretch across the entire width of the browser, with each div taking up 33% of the screen. On mobile devices, I need these divs to stack on top of each other while still occupying 100% of the mobile width.
What should be the ideal width for each div to achieve this layout? When I set the width of each div to 33%, it looks good on desktop but appears squished on mobile screens.
<style type="text/css">
.wrapdiv {
display: inline-block;
margin: 0;
vertical-align: top;
padding:20px;
}
</style>
<div class="wrapdiv" style="">
</div>
<div class="wrapdiv" style="">
</div>
<div class="wrapdiv" style="">
</div>