JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<main>
    <section></section>
    <aside></aside>
</main>

CSS

main {
        width:100%;
    }
    main aside {
        width:300px;
        background:red;
        min-height:300px;
        position:relative;
    }
    main section {
        width:100%;
        background:green;
        min-height:300px;
        float:left;
    }
    .haveSidebar main section {
        margin-left:301px;
    }

JavaScript

var sideBar = $('body > main > aside');
if (sideBar.length > 0) {
    $('body').addClass('haveSidebar');
} else {
    $('body').removeClass('haveSidebar');
}