How can I remove the small white lines between sections in my Webflow website's background images?

Published on
September 22, 2023

To remove the small white lines between sections in your Webflow website's background images, you can follow these steps:

  1. Identify the source of the white lines: Before taking any action, it's important to understand the cause of the white lines. In most cases, these lines occur due to the margin or padding settings of the sections. By default, sections in Webflow have a small amount of margin or padding that can create these lines.

  2. Adjust margin or padding settings: To remove the white lines, you can adjust the margin or padding settings of the sections. Here's how:

  • Select the section that contains the background image.
  • In the Style panel on the right-hand side, locate the Margin or Padding settings.
  • Set the top and bottom margin/padding to 0.
  • Apply the changes and preview the website to see if the white lines are gone.
  • Repeat these steps for other sections that have background images and white lines.
  1. Check for overlapping elements: Another possible cause of white lines between sections is overlapping elements. If there are elements (such as div blocks or containers) positioned below the section with the background image, they may create the appearance of white lines. To fix this:
  • Check if any elements are positioned underneath the section.
  • Adjust the positioning or remove any unnecessary elements that may cause the overlap.
  • Make sure there is no space between sections in the design view.
  1. Use zero line-height or font-size: In some cases, the white lines could be caused by slight spacing between lines of text within the sections. To remove this spacing, you can try:
  • Setting the line-height of the text inside the section to 0.
  • Setting the font-size of the text inside the section to 0.
  1. Utilize custom code: If none of the previous steps resolve the issue, you may need to use custom CSS code to remove the white lines. Here's an example of the code you can add:
.section-class {    margin-bottom: -1px;    padding-bottom: 1px;}
  • Replace .section-class with the class name of the sections that have the white lines.
  • Apply the custom code by inserting it into the custom code panel, custom code embed, or the project settings in Webflow.

Remember to periodically check your website on different devices and screen sizes to ensure the white lines have been successfully removed.

Example Questions:

  1. How do I remove white lines between sections in Webflow?
  2. What causes white lines to appear between background images in Webflow?
  3. Can I use custom code to remove white lines in Webflow?