Let's get started.
Blog
About
Contact
Bootstrap 4 Column Issue in Safari

safari

Viewing posts tagged safari

Bootstrap 4 Column Issue in Safari

So if you know anything about me, you know I love Bootstrap. It’s clean and allows you to make some great looking sites, responsively. I know a lot of people will say Flexbox over Bootstrap but Bootstrap 4 added Flexbox support so there ya go. That’s why I was pretty excited when Bootstrap 4 came out at the beginning of this year.

That said, I’ve found an issue using Bootstrap 4 with Apple Safari. The columns don’t line up as they should. For example, let’s say you have a three column row using .col-md-4. That should give you three columns, right? Unfortunately, in Safari, it doesn’t. You end up with the third column wrapping to the next line. See the figure below:

This drove me crazy for the longest time because I couldn’t figure out why it was happening. I did some digging and found a solution to this pesky problem. A tiny bit of CSS. Just add the following CSS to your site and the issue is fixed.

.row:before, .row:after {
    display: none !important;
}

Now I know this probably isn’t the most elegant solution but it works and from what I’ve found, doesn’t negatively impact anything else. I figured I’d post it for anyone else going crazy trying to figure out this issue.