Divi Tip – A Sliver of White

Divi Tip – A Sliver of White

It’s everything down to the little things that make a difference between an amateur and professional.

One of those little things is the double column images.

Here’s an example:

First, here’s how to do it.

Section
– margin: top 0, bottom 0
– padding: top 0, bottom 0

Rows
– columns: 2
– full width: yup
– Equalize column heights: yup
– margin: top 0, bottom 0
– padding: top 0, bottom 0

Now, a really important point to remember is that you have to make sure you cut both image out of the same template.

This means, make a blank file of a certain ratio (such as 1000×600) in an image editing app, like Photoshop, and paste images as layers on top, scale the layers how you want, and export the different instances of the images. This is to ensure that all the images are pixel perfectly identical in size.

(This is important because simply scaling the images to be the same size can result in fractional pixels in the size without you knowing it, and it causes problems later.)

So, now you upload two images in its respective columns and tada! a nice double image full width row.

But here’s the problem.

Sometimes, when the user is resizing the browser, you encounter a sliver of white.

Yes, this happens quite more often than you’d think.

The reason this happens is because in full width mode, the images need to keep their ratios while filling the width of the screen. This results in the calculations not being rounded up properly and we get very small half pixel lines.

This is less than ideal.

And it’s not like I can just NOT use that layout.

So here’s the solution.

Make the top or bottom margin -1px.

Really simple way of fixing this without adding extra calculations.

Get Breakdance

Breakdance is, in my opinion, the best page/site builder on the market, which is why all my tutorials use Breakdance. It's also why I have an affiliate link. You don't pay extra, but I get a little commission, so it helps support the site. Thanks!

Get ACF Pro

Another essential plugin for site building. This isn't an affiliate link, it's just for convenience.

Get WP Codebox Pro

If you'd like an easier to use, and more advanced code management plugin (instead of just editing and making files yourself) then WP codebox pro is for you. Adding php, js, and even SCSS. Pretty nice! Affiliate link below.

Blank Plugin

Sort of blank. It's made to be easy to use with the tutorials. Download and edit any way you see fit.
  1. 5

Leave a Reply

Your email address will not be published. Required fields are marked *

New tutorials

Auto-updating Year in Footer
Designing Beyond the Brief
Disable Gutenberg Editor on some ACF pages
ACF flexible content fields in Breakdance 2.4

Got a question? ask!

If you have any question about the content on this page, feel free to send me an email by clicking the button below.

newsletter? sign up!

Sign up to the newsletter for updates on tutorials, news, and offers.

Join the cypher!

An awesome membership program for Breakdance Builder users coupled with an inclusive, friendly community.

Got a question?

If you have a question about something on this page, send me an email, and hopefully I can answer, and we can solve it!