CSS: position nested element slightly outside of parent element’s bounds

You don’t need to apply position:absolute to the nested div.

And margin probably wouldn’t be the best practice in this case.

Just add position:relative to the nested div, and set it’s top to any number you want. In your case, it would probably be negative.

Check out this Fiddle.

Leave a Comment