Make Child Div Float Right of Parent
css
Solution
Since percentage-based margins are calculated against the containing block's width, you can set `margin-left` to `100%`.
Example
Problem
I'd like to make an inner div float right of the parent, regardless of the width of the parent. An example of what this looks like is here: http://jsfiddle.net/eqDyy/. That fiddle is just an example of what it should look like. It's done with the exact number of pixels given, but what I'm looking for is a solution that still lets that inner div appear to the right of its parent, even when the parent width changes. The following is the code used in the fiddle: HTML ``` <div id="one"> <div id="two"></div> </div> ``` CSS ``` #one { border:2px solid #ddd; width:150px; height:30px; } #two { border:2px solid #ddd; width:150px; height:30px; margin-left:150px; margin-top:-2px; } ``` Again, please remember that this is just to show what I'd like it to look like, but it isn't a satisfying implementation because it uses specific pixel amounts.