html - How to stack Second Div on First in Responsive (CSS)? -


i trying stack div 1 & div 2 (which side side in desktop mode), stack div 2 follwed div 1 below. used floats cannot make work. please find attach image short description.

desktop view

div 1(img) & div 2(txt)

tablet view 740px (stack div2 first & div 1)

div 2(txt)


div 1(img)

if understand question you're asking, want have 2 divs, div1, , div2, next each other on desktop, on mobile have div2 stack on top of div1.

to this. you'll want have html code div2 first in index.html file followed div1. specify float:right on desktop.

i've attached fiddle below better understanding. http://jsfiddle.net/d2o7zn1v/

in fiddle, div2 remain right of div1 on desktop stack on top of div1 on screen size below 600px.

i hope helps!


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -