Issue
I want a div to be always at the right of its parent div, so I use float:right
. It works.
But I also want it to not affect other content when inserted, so I use position:absolute
.
Now float:right
doesn't work, my div is always at the left of its parent div. How can I move it to the right?
Solution
Use
position:absolute;
right: 0;
No need for float:right
with absolute positioning
Also, make sure the parent element is set to position:relative;
Answered By - eivers88
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.