treehouse : what would you like to learn today?
Web Design Web Development iOS Development

positioning

  • I have been working a lot with relative and absolute positioning recently and I have noticed that if you do not provide a height for the parent div then the content that you position inside the div can overlap below the parent div. It doesn't make the div expand to fit the content. Now I know that happens because when you position an element it takes it out of the normal flow. What is the best way to deal with this issue without providing a width and height? is there a way?
  • sounds like you want to be using floats instead of absolute positioning. For content like photos and text Float is the best way to go. You just have to make sure to clear the float on the element below that content.