margin top negative value issue css
I have a div inside another div. I need to pull up the inside div out of
the container div. I used the following code. If i use margin top in
negative value the container div also move up with the inside div. I
couldn't use position absolute for some alignment issue.
Code:
<div style="background-color:#999999; width:150px; height:300px;">
<div style="position:relative; width:100px; height:100px;
background-color:#006633; margin-top:-50px;"></div>
</div>
How to achieve this with just position relative?
No comments:
Post a Comment