CSS: Adding Solid Border Messes up Layout

Date: 2016-08-26 |

**Problem: **I want to create a border on the top bar of my site, but when I add it my whole column layout gets messed up. Why is this and how can I fix it?

**Solution: **Most likely, the problem is that your media queries aren’t accounting for the extra spaces the borders are taking up. If you want to have a border and not worry about the extra pixels, try using outline:

outline: 1px solid black;

Source:

Want more like this?

The best / easiest way to support my work is by subscribing for future updates and sharing with your network.