tags:

views:

34

answers:

3

i have the following divs

<div id="outer"><img src="myimgpath"><div id="name">Username</div></div>

now i want to fix the inner div to the outer div's top right corner

+1  A: 

add float:right; to the inner div

Soufiane Hassou
This will also work.
edl
+1  A: 
<div id="outer" style="position:relative">
  <img src="myimgpath">
  <div id="name" style="position:absolute; top:0px; right:0px;">Username</div>
</div> 
John Hartsock
+2  A: 

Try something like this:

#outer{position:relative;overflow:hidden;height:100px;}
#name{position:absolute;right:0;}
edl