<button class="button1">Add content to main content</button>
<div class="wrapper">
<div class="header">HEADER</div>
<div class="main">
<div class="box sidebar">Left-sidebar</div>
<div class="box content">Main Content</div>
<div class="box sidebar">Right-sidebar</div>
</div>
<div class="footer">FOOTER</div>
</div>
body {
background: @beige;
color: black;
}
.wrapper {
height: 100%;
display: table;
width: 100%;
text-align: center;
}
.header {
display: table-row;
height: 1px;
background: @yellow;
}
.main {
height: 100%;
display: table;
width: 100%;
}
.box {
display: table-cell;
}
.sidebar {
width: 100px;
background: @orange;
}
.footer {
display: table-row;
height:1px;
background: @green;
color: @beige;
}
/*====== Ignore section below ======*/
@orange: #BD4932;
@yellow: #FFD34E;
@green: #105B63;
@beige: #FFFAD5;
/* Basic Style*/
* { margin:0; padding:0;}
html, body { height: 100%; }
button { padding: 5px 10px;position:fixed;bottom: 50px;right:0px;left:0px;margin:auto; width: 200px; display: block; -webkit-appearance: none;background: @orange; outline: none; border: 2px solid #DB9E36; color: @yellow; border-radius: 10px; box-shadow: 0 2px 3px rgba(0,0,0,0.5);cursor: pointer;}
button:active {border-color: @beige; color:@beige;}
View Compiled
document.querySelector(".button1").addEventListener("click", function(){
var element = document.createElement("div");
element.innerHTML = "<p>Additional Line</p><p>Additional Line</p><p>Additional Line</p>";
document.querySelector(".content").appendChild(element);
});
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.