Forums

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

Home Forums CSS Fixing the position created by negative top

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #243765
    prathoven
    Participant

    Hello everyone,
    I have been using css attribute: top: -value, I want to achieve the result1: http://codepen.io/prathoven/pen/RRrqJL
    by negative top value instead of negative margin-top value, but however negative top leads to the spacing between the divs as shown here: http://codepen.io/prathoven/pen/kXEQmY.
    Thank you.

    #243767
    prathoven
    Participant

    Sorry for taking your time with this post, I have solved the issue myself.
    I simply recommend negative top value(eg:top:-5em) instead negative margin-top value(eg: margin-top:-5em) with the element inside the div instead of the whole div. As it can cause the space below which is hard to fix.
    Thank you.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.