OK, one of the tools for making sites responsive is using something called a media query. In terms of responsiveness, a media query allows you to specify different CSS based on the width of the screen. For example, you may want to display a mobile menu (like a drop-down or a hamburger menu) instead of the full menu when the screen is below the width of a tablet (something you might want to think about for your own site).
In the case of your footer widgets, you’ve set the width to 20%, which is great, they resize themselves appropriately on narrower viewport widths. However, they start looking squished together when you get to smaller screen widths. This is where you can use a media query.
You typically create a media query section at the end of your stylesheet, so that the media query rules will override the “normal” rules. So add this to the end of your stylesheet:
/* These rules are for a tablet */
@media only screen and (max-width : 768px) {
.footerwidget {
width: 100%;
margin-bottom: 20px;
border-bottom: 1px #ccc solid;
}
}
So what this does is when the screen width goes under 768px, which is the width of an iPad, the width of the footer widgets go to 100%, and they will “collapse” on top of one another. I also added a border-bottom property so there will be a clear visual division between the widgets.
You can add other media query sections, too, based on your design needs. For example, some developers might add another section for screen widths up to 320px, which is the width of a smartphone.