0

I am learning Bootstrap and I encounter this problem. I'd like something like this on Desktop

Text

and Mobile will be like this

Text

I just can't make it work so I have a following hack. Wrap 2 and 3 in a div, then make a 4th div with the same content as 2 and hide it (#4) on desktop, and hide #2 when on mobile.

Text

Text

Is there a way to do it cleaner? Note that I know nothing about CSS. I only work with what bootstrap 4 have. I don't necessary need any code, showing me a hint how to solve this would be awesome enough.

NepNep
  • 274
  • 1
  • 2
  • 6
  • You don't need a wrapper. Just the 4th div will do. Hide the 4th in desktop and hide the second one in mobile. – MonkeyScript Jul 16 '20 at 03:43
  • @Arcteezy but I feel bad doing it like that. Having duplicate code just doesn't feel right to me. Especially the content of div 2 and 4 could be huge. – NepNep Jul 16 '20 at 04:11

0 Answers0