html - Overlapping Images when making site Responsive -


i'm trying convert website made responsive website. website layout looks this:

http://jsfiddle.net/zdk6p/

except images overlap way on fiddle when re-size browser test page on smartphone. elements responsive 2 images in middle (200x150) , text below it. i'm trying convert website when re-size browser, everything, including 2 images on far right turns 1 columns site, matching above element's width so:

enter text here: aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa  **************** *  image       * * **************              bbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbb  **************** *  image       * **************** cccccccccccccccc cccccccccccccccc cccccccccccccccc  **hello world** ddddddddddddddd ddddddddddddddd  *************** *  image      * *             * *             * ***************  *************** *             * *  image      * *             *  *************** 

i have media query in css code:

@media screen , (max-width: 480px){      .events{      display: block;     position: absolute;     width: 25%;     line-height: 200%;   }  .events p{     background-color: #d8b5a3;     margin: 0 5%;      font-family: 'chivo';     color: #ffffff;     width: auto;     position: relative; }  .events .events-plugin{     max-width: 100%;     position: absolute;     display:block;     left: 10%;     width: auto;     height: auto; }   .container .picture{      position: absolute;     display: block;     max-width: 100%;     width: auto;     height: auto; } } 

but won't work, images on far right overlap. how can fix issue? in advance.

i think doing hard way, here want, on simpler way:

http://jsfiddle.net/luckmattos/zdk6p/2/

html

<div class="row">     <!-- main content -->     <div class="col-main">        <div class="img">         <img src="http://placehold.it/200x150" alt="flower">         <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p>        </div>     </div>      <!-- side bar -->     <div class="col-side">         <p>hello world!</p>         <img src="http://placehold.it/251x281" alt="events">     </div>  </div> 

css

.row {    border:1px solid blue; } .row:before, .row:after { content: " "; display: table; clear:both; } .col-main {     position:relative;     border:1px solid green;     float:left;     width:48%;     padding:10px;     box-sizing:border-box; } .col-side {     position:relative;     border:1px solid red;     float:left;     width:48%;     padding:10px;     box-sizing:border-box; }  @media (max-width:480px) {      .col-side,      .col-main {          width:100%;      } } 

work html structure (div):

<container> <row> <column1></column1> <column2></column2> </row> </container> 

*the first column on top.

but should think in use grid system responsive design.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -