manix Posted August 9, 2011 Share Posted August 9, 2011 Hey, I remember doing this before, but I can't manage to do it now. I have a div inside a div and I want that inside div's position to be at the right of the main div but if I do this <div> <div style="position:absolute;right:0px;"></div> </div> it sends it to the very right of the whole page. Quote Link to comment https://forums.phpfreaks.com/topic/244320-absolute-positioning/ Share on other sites More sharing options...
gristoi Posted August 9, 2011 Share Posted August 9, 2011 <div style="position:relative;"> <div style="position:absolute;right:0px;"></div> </div> Quote Link to comment https://forums.phpfreaks.com/topic/244320-absolute-positioning/#findComment-1254850 Share on other sites More sharing options...
manix Posted August 9, 2011 Author Share Posted August 9, 2011 exactly! Thank you Quote Link to comment https://forums.phpfreaks.com/topic/244320-absolute-positioning/#findComment-1254853 Share on other sites More sharing options...
AyKay47 Posted August 9, 2011 Share Posted August 9, 2011 you can use what gristoi suggested, however the div inside of the parent div will not be contained...if you want it to remain contained, use float:right <div style="position:relative;"><div style="float:right;"></div></div> Quote Link to comment https://forums.phpfreaks.com/topic/244320-absolute-positioning/#findComment-1254854 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.