-2

I am trying to stack Div 1 & Div 2 (which are side by side in desktop mode), to stack Div 2 follwed by Div 1 below. I used floats but cannot make it work. Please find the attach image for short description.

Desktop View

DIV 1(Img) & DIV 2(Txt)

Tablet view 740px (Stack Div2 First & Div 1)

DIV 2(Txt)


DIV 1(Img)

Kara
  • 6,115
  • 16
  • 50
  • 57
Hyde110
  • 1
  • 1

1 Answers1

0

If I understand the question you're asking, you want to have two divs, div1, and div2, next to each other on desktop, but on mobile have div2 stack on top of div1.

To do this. you'll want to have the HTML code for div2 first in you index.html file followed by div1. Then specify float:right on desktop.

I've attached a fiddle below for a better understanding. http://jsfiddle.net/d2o7zn1v/

In this fiddle, div2 will remain to the right of div1 on desktop but stack on top of div1 on a screen size below 600px.

I hope this helps!

Blake
  • 561
  • 5
  • 14