0

I searched many answers but most use fixed width. I want the center div to have a variable width and the right div to be a space or 2 to the right of the center div, but keeping the center div fixed in the center as the width of the text in the right div changes. Also no fixed position of the right div (as one answered suggested) becuase the width of the screen might change (should work with no change for a computer screen and a smartphone screen).

Zvi
  • 2,354
  • 2
  • 26
  • 37
  • from the duplicate remove the left block – Temani Afif Aug 03 '21 at 12:32
  • Just try with grid and justify-self `
    asdfdsaf
    afdsfasdf
    `
    – fatm Aug 03 '21 at 12:35
  • @Fatima Mazhit - your solution is not enough. I stated that the right div should be a space from the center one, and when I tried your soltion thr right div is flashed to the right edge of the screen. It is also not at the same row as the value displayed in the center - it is one row down. – Zvi Aug 04 '21 at 13:47

0 Answers0