Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Remove horizontal spacing between divs

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #263413
    techgibberish
    Participant

    I’m trying to lay out a food menu. Here’s an example of what I have.
    https://imgur.com/AXfdjoY

    Here’s what I would like it to be.
    https://imgur.com/nFEx0ap

    Here’s my code so far.
    https://codepen.io/techGibberish/pen/ooOYOZ

    #263424
    Beverleyh
    Participant

    Heading elements have, amongst other things, default margins.

    Try zeroing the top margin on the h4 and the bottom margin on the h2 to bring them closer to other elements.

    #263430
    Paulie_D
    Member

    Indeed…if you click the Cog on the CSS section and pick “reset” you get this

    https://codepen.io/Paulie-D/pen/RjOVba

    Google “CSS Reset” or “CSS Normalize” for more information.

    #264347
    techgibberish
    Participant

    Sorry for the late reply, but here is what fixed it. I’m using flexbox inside a the text module of the Divi theme by Elegant Themes. There were additional line breaks added that were not in my code. The were visible when inspecting the code via Chrome. They appeared around code that had been commented out. The comments were bracketed with /…./ so I don’t know what the issue is, but as they were notes for me, I removed them. The breaks promptly disappeared and all is well. thank you both for your input.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design’ is closed to new topics and replies.