Absolute positioning inside a Floated Relative position

CarmenC

New Member
The is a boostrap example, as you can see the \[code\]span4\[/code\] is using \[code\]pull-right\[/code\] to float to the right, but the \[code\]test\[/code\] block is position from the beginning of the block so it appear to the \[code\]left\[/code\] instead of \[code\]right\[/code\] in the demo.What I want is make it position from the real \[code\]span4\[/code\] position, i.e. right instead of left\[code\]<!DOCTYPE html><html lang="en"> <head> <link href="http://stackoverflow.com//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet"> </head> <body> <div class="row"> <div class="span4 pull-right" style='position:relative;'> <div class='test' style='position:fixed;left:0;top:0'>test</div> </div> <div class="span8"> left </div> </div> </body></html>\[/code\]Demo: http://jsfiddle.net/Ug2cH/1/
 
Back
Top