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
  • #263413

    I’m trying to lay out a food menu. Here’s an example of what I have.

    Here’s what I would like it to be.

    Here’s my code so far.


    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.


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

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


    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.