html - How can I get an absolute element to float right within its parent? -


so, i'm trying dropdown work part of menu. have ul few li elements added on left , want have li element float right. doing using relative position before, want able overflow , display on below it.

i found question: css: overflow auto , z-index , found out have use absolute position sort of overflow happen. so, how this?

this basic code structure:

<ul>     <li id="right_item1"/> (relatively positioned)     ...     <li id="absolute_position"/> (absolutely positioned, floating right) </ul> 

this should work you.

ul{     position:relative; // need }  #absolute_position{    position:absolute;    right:0;    bottom:0;   } 

Comments

Popular posts from this blog

ios - Memory not freeing up after popping viewcontroller using ARC -

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -