@media all and (min-width: 630px) { /* two column code */ #ResContainer { display: flex ; align-items: stretch ; flex-flow: row wrap ; } #ResImg { order: 1 ; width: 20%; } #ResContent { order: 2 ; width: 80% ; } } @media all and (max-width: 629px) { /* one column code */ #ResContainer { display: flex ; align-items: stretch ; flex-flow: column wrap ; } #ResImg { order: 2 ; width: 100%; } #ResContent { order: 1 ; width: 100% ; } } #GreenDivText2 { width: 100%; padding: 20px 0; text-align: center; color: white; background-color: Green; margin-top: 10px; } #AmberDivText2 { width: 100%; padding: 50px 0; text-align: center; color: white; background-color: orange; margin-top: 20px; } #RedDivText2 { width: 100%; padding: 50px 0; text-align: center; color: white; background-color: red ; margin-top: 20px; } #GreenDivText { width: 100%; padding: 20px 0; text-align: center; color: white; background-color: Green; margin-top: 10px; } #AmberDivText { width: 100%; padding: 50px 0; text-align: center; color: white; background-color: orange; margin-top: 20px; } #RedDivText { width: 100%; padding: 50px 0; text-align: center; color: white; background-color: red ; margin-top: 20px; } .comment { } a.morelink { text-decoration:none; outline: none; } .morecontent span { display: none; } a { color:white; } a:visited { color:white; } $(document).ready(function() { var showChar = 50; var ellipsestext = "...."; var moretext = "more"; var lesstext = "less"; $('.more').each(function() { var content = $(this).html(); if(content.length > showChar) { var c = content.substr(0, showChar) ; var h = content.substr(showChar+1, content.length - showChar+1); var html = c + ''+ellipsestext+' ' + h + ' '+moretext+''; $(this).html(html); } }); $(".morelink").click(function(){ if($(this).hasClass("less")) { $(this).removeClass("less"); $(this).html(moretext); } else { $(this).addClass("less"); $(this).html(lesstext); } $(this).parent().prev().toggle(); $(this).prev().toggle(); return false; }); });