CSS side by side div with Pixel and Percent widths

后端 未结 7 978
半阙折子戏
半阙折子戏 2020-12-08 10:54

I have two div\'s (side by side) inside a parent div, i want right div to occupy 100% of remaining space (i.e. 100% - 200px) and should always stay next to left div (not bel

7条回答
  •  抹茶落季
    2020-12-08 11:42

    your left div should have float left and its pixel width using position relative. Your right div should only have position relative and maybe an overflow hidden. This should fix your problem. No need to use the use the div that clears the float.

提交回复
热议问题