0

I have a question about margin in CSS. I have a DIV element, which has an image for background. Inside that DIV I have another DIV. I want this DIV inside to be 200px from the top. But, when I do that, the outside DIV also moves down for 200px. Why is that and how to keep the outside DIV on top?

MaTTo
  • 2,326
  • 5
  • 20
  • 24

1 Answers1

3

Set padding-top on your outside div. For an detailed explanation to your problem see here.

Community
  • 1
  • 1
Mamuz
  • 1,730
  • 12
  • 14
  • Thanks! Well, I added 'overflow: auto' to parent div and than it worked! Thanks for link. – MaTTo Sep 18 '13 at 11:30