I have the following divs
<div id="outer"><img src="myimgpath"><div id="name">Username</div></div>
How do I fix the inner div to the outer div's top right corner?
Try something like this:
#outer {
position: relative;
overflow: hidden;
height: 100px;
}
#name {
position: absolute;
right: 0;
}
<div id="outer" style="position:relative">
<img src="myimgpath">
<div id="name" style="position:absolute; top:0px; right:0px;">Username</div>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With