1. PROMO Upgrade to Pro Membership @ $99 / Lifetime & access all our 16+ premium Divi extensions: Divi Block, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Solved Right way to control spacing between columns

Discussion in 'Free Divi Community Forum' started by Igor Romanov, Dec 1, 2020.

  1. Igor Romanov

    Igor Romanov New Member

    I am implementing the layout provided by a designer.
    As a part of the designs, I need to set a specific spacing between various columns.
    Layouts I'm working on are like this:

    [image] 15px [text]
    [text] 15px [image]

    For some reason, there's no custom margin setting for a Column.
    I can set custom Gutter but I can't set it precisely in pixels.

    I was trying different ways to solve this:

    - Set gutter to 1 (no gutter) and use transform / translateX to move columns left and right 8px to have 16px between them. This works well with max-width for a row to make sure the section width matches the expected value.

    - Set a transparent right border of width 16px. Also seems to work out fine so far.

    I've also tried to just add custom CSS "margin-right: 15px;" for a Column but that didn't work.

    Would appreciate your advice on how to best implement this!
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade horizontal timeline design for your Divi site without using any plugins:View Demo
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    I would choose this method. Just set the row gutter width to be 1 & add transparent border.
     
  3. Igor Romanov

    Igor Romanov New Member

    This method has its cons:
    - You cannot have a border on cards (columns).
    - You cannot have round corners (since the internal border-radius cannot be set via CSS explicitly, and by default is is (border-radius - border-width) and in most cases will be zero.

    So far I've ended up with either using translateX() or using custom CSS rules to give margins.
    I had to use id on each column element to make it work since the theme CSS enforces zero margins.
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade slide in bar design for your Divi site without using any plugins:View Demo
  4. Divi.Help

    Divi.Help Administrator
    Staff Member

    What if you try to go to the Column Settings > Advanced > Custom CSS > Main Element & add margin-right: 15px!important;