how to place last div into right top corner of parent div? (css)

前端 未结 5 1051
迷失自我
迷失自我 2020-12-14 05:35

Can I somehow use CSS to place the block2 in top right corner of block1?


Context :

  • block2
5条回答
  •  时光取名叫无心
    2020-12-14 05:56

    You can simply add a right float to .block2 element and place it in the first position (this is very important).

    Here is the code:

    
    
        
    
    
        
    block2

    text

    text2

    Regards...

提交回复
热议问题