Forums

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

Home Forums CSS Alternative to margin-top?

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #45828
    npav
    Participant

    Hello,

    I am working on a website and am relatively new to CSS, I am wondering if there is an alternative to margin-top when positioning divs.

    Right now I have everything where I want it to be, but if I move a div at the top, the divs below it also jump down or up, since I used margin-top.

    Any thoughts?

    #140185
    Paulie_D
    Member

    We’d need to see the site.

    Are you adding the margin to a class or an ID?

    If you have “everything where I want it to be”, why are you moving divs?

    #140281
    Paulie_D
    Member

    That’s WAAAAY too much code.

    Please put a **reduced** case in Codepen.io

    Or provide a link to a live site.

    #140284
    Paulie_D
    Member

    I can tell you now…this…

    is a bad idea.

    #140286
    Paulie_D
    Member

    Your menu structure is also wrong

    This

    `

    • Plastic Letters & Logos
    • Injection Molded
    • `

      Now, where are the margins that need changing?

    #140265
    Paulie_D
    Member

    Whoa…those are some huge margins.

    It makes me think your HTML structure is marginal. You really shouldn’t need to do that.

    I think you need to look at alternative layout methods, specifically “floats”.

    http://learnlayout.com/

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