CSS: Adding Solid Border Messes up Layout

Date: 2016-08-26 |

DISCLOSURE: If you buy through affiliate links, I may earn a small commission. (disclosures)

**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 way to support my work is to like / comment / share for the algorithm and subscribe for future updates.