How to right align fixed position div inside a div

后端 未结 7 2146
庸人自扰
庸人自扰 2021-02-19 19:03

My code is like this.

some text here

CSS:



        
相关标签:
7条回答
  • 2021-02-19 19:27

    Two options. Simply float the inner div right or else use absolute positioning to achieve it.

    For floating simply set float:right on the inner DIV and overflow:hidden on the outer DIV.

    For absolute positioning simply set position:relative on the outer DIV and set position: absolute and right:0 top:0 on the inner DIV.

    0 讨论(0)
提交回复
热议问题