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

Home Forums CSS Help me with this HTML CSS question

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #237975

    I have a div within a div, and when I give attributes to the second div, the one inside another, such as top: 0, this sends the div to the top of the page outside of the div. How do I get it to align itself with the top, bottom, left, and/or right of a div, and not the whole page?


    Adding some code (preferably a Codpen demo) will likely get you a whole lot more response…

    But it sounds like you’re using absolute positioning – give the parent position: relativein that case.

    1. post a snippet
    2. you can always get away without positioning your elements, that said
    3. post a demo
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.