JSFiddle - React, Tailwind, and code Playground
HTML
<div class="footer-widgets"><div class="wrap"><div class="footer-widgets-1 widget-area"><section id="testimonial_footer-3" class="widget widget_testimonial_footer"><div class="widget-wrap"><div id="testimonial_widget"><h4 class="widget-title widgettitle">Testimonial</h4><p class="myclass">Loved being a student at . They really helped me grow as a</p><div id='tinyname'> </p> - Louise findlay, former student </div> </div></section>
</div>
<div class="footer-widgets-3 widget-area"><section id="black-studio-tinymce-2" class="widget widget_black_studio_tinymce"><div class="widget-wrap"><h4 class="widget-title widgettitle">Associated with:</h4>
<div class="textwidget"><p>
<img class="" src ="http://purelyfacts.com/pics/items/animals/Giraffe.jpg" alt="image 1" width="300" height="300" />
</div></div></section>
</div></div></div>
CSS
body {
background-color: #f5f5f5;
color: #333;
font-family: Lato, sans-serif;
font-size: 18px;
font-weight: 300;
line-height: 1.625;
margin: 0;
}
p {
margin: 0 0 28px;
padding: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #333;
font-family: Lato, sans-serif;
font-weight: 400;
line-height: 1.2;
margin: 0 0 10px;
}
h1 {
font-size: 36px;
}
.footer-widgets button,
.footer-widgets input[type="button"],
.footer-widgets input[type="reset"],
.footer-widgets input[type="submit"],
.footer-widgets .button {
background-color: #e5554e;
color: #fff;
}
.footer-widgets button:hover,
.footer-widgets input:hover[type="button"],
.footer-widgets input:hover[type="reset"],
.footer-widgets input:hover[type="submit"],
.footer-widgets .button:hover {
background-color: #fff;
color: #333;
}
.widget {
word-wrap: break-word;
}
.widget ol > li {
list-style-position: inside;
list-style-type: decimal;
padding-left: 20px;
text-indent: -20px;
}
.widget li li {
border: none;
margin: 0 0 0 30px;
padding: 0;
}
.widget_calendar table {
width: 100%;
}
.widget_calendar td,
.widget_calendar th {
text-align: center;
}
footer-widgets .entry {
border-bottom: 1px dotted #666;
}
.footer-widgets {
background-color: #333;
clear: both;
padding-top: 40px;
}
.footer-widgets,
.footer-widgets a {
color: #999;
}
.footer-widgets input {
border: 1px solid #333;
}
.footer-widgets a.button,
.footer-widgets a:hover {
color: #fff; /*used to be fff */
}
.footer-widgets li {
border-bottom: 1px dotted #666;
margin-bottom: 10px;
padding-bottom: 10px;
}
.footer-widgets .widget {
margin-bottom: 40px;
}
.footer-widgets p:last-child {
margin-bottom: 0;
}
.footer-widgets-1,
.footer-widgets-2,
.footer-widgets-3 {
width: 340px;
}
.footer-widgets-1 {
margin-right: 60px;
}
.footer-widgets-1,
.footer-widgets-2 {
float: left;
}
.footer-widgets-3 {
float: right;
}
/* # Site Footer
----------------------------------------------------------------------------------------------------...
JavaScript
'use strict';
// Get current browser width
var browserWidth = jQuery(window).width();
// Responsive: Get Width
jQuery(window).resize(function() {
browserWidth = jQuery(this).width();
// Set size of footer-widgets-*
selectorSizing( browserWidth );
});
/*
* Resizes the selector to the designated size
*
* @param int size Browser Size to do nothing
* @param string selector Selector, defaults to '#footer-widgets .widget-area'
*/
function selectorSizing( size, selector ) {
var heights = [];
// selector as optional argument
if ( !selector)
var selector = '.footer-widgets ';
// size is required
if ( !size)
return false;
// Responsive Code
// Widgets move to 100% width if width of the browser window is < 300px
// Done via @media only screen and (max-width: 300px) { } in style.css
if( 300 < size ) {
jQuery(selector).each( function( index, value ) {
heights[index] = jQuery(this).height();
});
// Set max height
var max = Math.max.apply( Math, heights );
// Assign max height to the footer-widgets
jQuery(selector).each( function( index, value ) {
jQuery(this).height(max);
});
}
else {
// Remove max height to the footer-widgets
jQuery(selector).each( function( index, value ) {
jQuery(this).height('auto');
});
}
}
selectorSizing( browserWidth );