CSS collapse/expand - html

I have a pure CSS CSS Expand/Collapse div which is based on someone else's code # here by default hidden text is collapsable but it would be better if the text expands after the click.
Anyone have suggestions on how to edit this code so that text is minimize before the click is minimized? It would be better if javascript is avoided and Wordpress compactible.
<main>
<h2>CSS Expand/Collapse Section</h2>
<input id="toggle" type="checkbox" checked>
<label for="toggle">Hidden Kitten</label>
<div id="expand">
<section>
<p>mew</p>
</section>
</div>
<section>
<h3>Other content</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas porta non turpis faucibus lobortis. Curabitur non eros rutrum, gravida felis non, luctus velit. Ut commodo congue velit feugiat lobortis. Etiam nec dolor quis nulla bibendum blandit vitae nec enim. Maecenas id dignissim erat. Aenean ac mi nec ante venenatis interdum quis vel lacus.
</p>
<p>Aliquam ligula est, aliquet et semper vitae, elementum eget dolor. In ut dui id leo tristique iaculis eget a dui. Vestibulum cursus, dolor sit amet lacinia feugiat, turpis odio auctor nisi, quis pretium dui elit at est. Pellentesque lacus risus, vulputate sed gravida eleifend, accumsan ac ante. Donec accumsan, augue eu congue condimentum, erat magna luctus diam, adipiscing bibendum sem sem non elit.</p>
</section>
</main>
CSS
#import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700);
body {
font-family: "Open Sans", Arial;
background: #CCC;
}
main {
background: #EEE;
width: 600px;
margin: 20px auto;
padding: 10px 0;
box-shadow: 0 3px 5px rgba(0,0,0,0.3);
}
h2 {
text-align: center;
}
p {
font-size: 13px;
}
input {
display: none;
visibility: hidden;
}
label {
display: block;
padding: 0.5em;
text-align: center;
border-bottom: 1px solid #CCC;
color: #666;
}
label:hover {
color: #000;
}
label::before {
font-family: Consolas, monaco, monospace;
font-weight: bold;
font-size: 15px;
content: "+";
vertical-align: text-top;
display: inline-block;
width: 20px;
height: 20px;
margin-right: 3px;
background: radial-gradient(ellipse at center, #CCC 50%, transparent 50%);
}
#expand {
height: 0px;
overflow: hidden;
transition: height 0.5s;
background: url(http://placekitten.com/g/600/300);
color: #FFF;
}
section {
padding: 0 20px;
}
#toggle:checked ~ #expand {
height: 250px;
}
#toggle:checked ~ label::before {
content: "-";
}

I think you are looking to have the image start collapsed.
All you need to do is remove the checked attribute from the input checkbox to achieve this.
Change:
<input id="toggle" type="checkbox" checked>
To:
<input id="toggle" type="checkbox">
Here is you code in a runable snippet:
body {
font-family: "Open Sans", Arial;
background: #CCC;
}
main {
background: #EEE;
width: 600px;
margin: 20px auto;
padding: 10px 0;
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}
h2 {
text-align: center;
}
p {
font-size: 13px;
}
input {
display: none;
visibility: hidden;
}
label {
display: block;
padding: 0.5em;
text-align: center;
border-bottom: 1px solid #CCC;
color: #666;
}
label:hover {
color: #000;
}
label::before {
font-family: Consolas, monaco, monospace;
font-weight: bold;
font-size: 15px;
content: "+";
vertical-align: text-top;
display: inline-block;
width: 20px;
height: 20px;
margin-right: 3px;
background: radial-gradient(ellipse at center, #CCC 50%, transparent 50%);
}
#expand {
height: 0px;
overflow: hidden;
transition: height 0.5s;
background: url(http://placekitten.com/g/600/300);
color: #FFF;
}
section {
padding: 0 20px;
}
#toggle:checked~#expand {
height: 250px;
}
#toggle:checked~label::before {
content: "-";
}
<main>
<h2>CSS Expand/Collapse Section</h2>
<input id="toggle" type="checkbox">
<label for="toggle">Hidden Kitten</label>
<div id="expand">
<section>
<p>mew</p>
</section>
</div>
<section>
<h3>Other content</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas porta non turpis faucibus lobortis. Curabitur non eros rutrum, gravida felis non, luctus velit. Ut commodo congue velit feugiat lobortis. Etiam nec dolor quis nulla bibendum blandit
vitae nec enim. Maecenas id dignissim erat. Aenean ac mi nec ante venenatis interdum quis vel lacus.
</p>
<p>Aliquam ligula est, aliquet et semper vitae, elementum eget dolor. In ut dui id leo tristique iaculis eget a dui. Vestibulum cursus, dolor sit amet lacinia feugiat, turpis odio auctor nisi, quis pretium dui elit at est. Pellentesque lacus risus, vulputate
sed gravida eleifend, accumsan ac ante. Donec accumsan, augue eu congue condimentum, erat magna luctus diam, adipiscing bibendum sem sem non elit.</p>
</section>
</main>

Just remove checked in your input and you're good to go.
It should look like this:
<input id="toggle" type="checkbox">

Related

Accordion Dropdown not animating properly

I'm having some trouble with an Accordion Dropdown snippet on codepen.
function togglePara(n, m) {
var para = document.getElementById(m + '-para' + n);
para.classList.toggle('active');
}
function showModule(m) {
debugger;
var item = document.getElementById(m);
var other = document.getElementsByClassName('dropdown');
for (var i = 0; i < other.length; i++) {
other[i].style.display = "none";
}
item.style.display = "block";
}
* {
padding: 0;
margin: 0;
font-family: 'montserrat', sans-serif;
}
main {
background-color: salmon;
overflow: auto;
padding-top: 100px;
height: 100vh;
width: 100vw;
}
#accordion {
display: none;
}
.dropdown {
width: auto;
margin: auto;
padding: 2em;
}
section {
margin: auto;
width: 70%;
overflow: hidden;
}
a {
display: block;
width: 100%;
text-align: center;
text-decoration: none;
color: #4673AD;
background-color: #eee;
padding: 1em 0;
position: relative;
z-index: 1;
}
a:hover {
color: #eee;
background-color: #4673AD;
transition: .5s;
}
#keyframes slide {
0% {
max-height: 0
}
100% {
max-height: 300px
}
}
p {
display: none;
height: -400px;
padding: 0;
}
.active {
display: block;
background-color: #E5FB8B;
color: #444;
text-align: justify;
padding: 1em;
padding-top: 2em;
position: relative;
z-index: 0;
height: -400px;
animation: slide 1s 1s;
}
nav {
display: none;
}
nav section p {
test-align: center;
}
.buttons {
display: flex;
width: 70%;
margin: 1em auto;
}
.button {
padding: 1em;
border: 2px solid #E5FB8B;
background-color: #E5FB8B;
color: #333;
border-radius: 8px;
width: 40%;
margin: 1em;
}
a.button:hover {
border: 2px solid #4673AD;
color: #e5fb8b;
}
<main>
<div id="accordion" class="dropdown">
<section>
Read Me First
<p id="accordion-para1">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer tempus odio id nisl blandit, pharetra cursus nibh porta. Donec sodales, turpis vitae interdum tincidunt, ante diam scelerisque erat, sed accumsan elit tortor bibendum turpis. In et
tempus est. Quisque dictum aliquet nunc, sed ullamcorper velit pharetra sit amet. Fusce posuere arcu dolor, eget scelerisque tellus bibendum in. Integer eget condimentum arcu. Duis vitae aliquet enim.</p>
</section>
<section>
No, Read <i>Me</i> First
<p id="accordion-para2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer tempus odio id nisl blandit, pharetra cursus nibh porta. Donec sodales, turpis vitae interdum tincidunt, ante diam scelerisque erat, sed accumsan elit tortor bibendum turpis. In et
tempus est. Quisque dictum aliquet nunc, sed ullamcorper velit pharetra sit amet. Fusce posuere arcu dolor, eget scelerisque tellus bibendum in. Integer eget condimentum arcu. Duis vitae aliquet enim.</p>
</section>
<section>
Just Read <i>Me</i>, Please
<p id="accordion-para3">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer tempus odio id nisl blandit, pharetra cursus nibh porta. Donec sodales, turpis vitae interdum tincidunt, ante diam scelerisque erat, sed accumsan elit tortor bibendum turpis. In et
tempus est. Quisque dictum aliquet nunc, sed ullamcorper velit pharetra sit amet. Fusce posuere arcu dolor, eget scelerisque tellus bibendum in. Integer eget condimentum arcu. Duis vitae aliquet enim.</p>
</section>
</div>
<nav id="menu" class="dropdown">
<section>
<a href="javascript:void(0)" onclick=togglePara(1)>Home</a></section>
<section>
Portfolio
<p id="menu-para1">Item one</p>
<p id="menu-para2">Item Two</p>
</section>
<section>
Meet The Team
<p id="menu-para3">John Doe</p>
<p id="menu-para4">Sara Faun</p>
</section>
</nav>
<div class="buttons">
Show Accordion
Show Menu
</div>
</main>
I want to animate the dropdown's expansion. I want it to start from the top of the container. Now, it starts from the end of the padding. Doesn't look nice. I've delayed the animation 1s so you can tell what I mean
Here's a link to my pen: https://codepen.io/b3u/pen/RBbeWy. Thanks in advance!
Transition instead of animation, in this case, as it is simpler.
didn't touch the animation code, just created the transition effect.
Transition on max-height will not use GPU processing so be aware of possible performance issues on mobile devices (or old computers)
function togglePara(n, m) {
var para = document.getElementById(m + '-para' + n);
para.classList.toggle('active');
}
function showModule(m) {
var item = document.getElementById(m);
var other = document.getElementsByClassName('dropdown');
for (var i = 0; i< other.length ; i++){
other[i].style.display = "none";
}
item.style.display = "block";
}
*{
padding: 0;
margin: 0;
font-family: 'montserrat', sans-serif;
}
main {
background-color: salmon;
overflow: auto;
padding-top: 100px;
height: 100vh;
width: 100vw;
}
#accordion {
display: none;
}
.dropdown {
width: auto;
margin: auto;
padding: 2em;
}
section {
margin: auto;
width: 70%;
overflow: hidden;
}
a {
display: block;
width: 100%;
text-align: center;
text-decoration: none;
color: #4673AD;
background-color: #eee;
padding: 1em 0;
position: relative;
z-index: 1;
}
a:hover {
color: #eee;
background-color: #4673AD;
transition: .5s;
}
#keyframes slide{
0% {max-height: 0}
100% {max-height: 300px}
}
p {
display: block;
max-height: 0;
overflow:hidden;
padding: 0;
transition:max-height 0.5s ease-out,padding 0.5s ease-out;
-moz-transition:max-height 0.5s ease-out,padding 0.5s ease-out;
-webkit-transition:max-height 0.5s ease-out,padding 0.5s ease-out;
background-color: #E5FB8B;
color: #444;
text-align: justify;
position: relative;
z-index: 0;
box-sizing:border-box;
}
p.active{
padding: 2em 1em 1em 1em;
max-height: 1000px;
transition:max-height 2.5s ease-out,padding 0.5s ease-out;
-moz-transition:max-height 2.5s ease-out,padding 0.5s ease-out;
-webkit-transition:max-height 2.5s ease-out,padding 0.5s ease-out;
}
nav{
display: none;
}
nav section p {
test-align: center;
}
.buttons {
display: flex;
width: 70%;
margin: 1em auto;
}
.button {
padding: 1em;
border: 2px solid #E5FB8B;
background-color: #E5FB8B;
color: #333;
border-radius: 8px;
width: 40%;
margin: 1em;
}
a.button:hover{
border: 2px solid #4673AD;
color: #e5fb8b;
}
<main>
<div id="accordion" class="dropdown">
<section>
Read Me First
<p id="accordion-para1">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer tempus odio id nisl blandit, pharetra cursus nibh porta. Donec sodales, turpis vitae interdum tincidunt, ante diam scelerisque erat, sed accumsan elit tortor bibendum turpis. In et
tempus est. Quisque dictum aliquet nunc, sed ullamcorper velit pharetra sit amet. Fusce posuere arcu dolor, eget scelerisque tellus bibendum in. Integer eget condimentum arcu. Duis vitae aliquet enim.</p>
</section>
<section>
No, Read <i>Me</i> First
<p id="accordion-para2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer tempus odio id nisl blandit, pharetra cursus nibh porta. Donec sodales, turpis vitae interdum tincidunt, ante diam scelerisque erat, sed accumsan elit tortor bibendum turpis. In et
tempus est. Quisque dictum aliquet nunc, sed ullamcorper velit pharetra sit amet. Fusce posuere arcu dolor, eget scelerisque tellus bibendum in. Integer eget condimentum arcu. Duis vitae aliquet enim.</p>
</section>
<section>
Just Read <i>Me</i>, Please
<p id="accordion-para3">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer tempus odio id nisl blandit, pharetra cursus nibh porta. Donec sodales, turpis vitae interdum tincidunt, ante diam scelerisque erat, sed accumsan elit tortor bibendum turpis. In et
tempus est. Quisque dictum aliquet nunc, sed ullamcorper velit pharetra sit amet. Fusce posuere arcu dolor, eget scelerisque tellus bibendum in. Integer eget condimentum arcu. Duis vitae aliquet enim.</p>
</section>
</div>
<nav id="menu" class="dropdown">
<section>
<a href="javascript:void(0)" onclick=togglePara(1)>Home</a></section>
<section>
Portfolio
<p id="menu-para1">Item one</p>
<p id="menu-para2">Item Two</p>
</section>
<section>
Meet The Team
<p id="menu-para3">John Doe</p>
<p id="menu-para4">Sara Faun</p>
</section>
</nav>
<div class="buttons">
Show Accordion
Show Menu
</div>
</main>
Below an updated version of your code, the change was adding reset for padding at the top and bottom at the beginning of the animation. Hope this help.
All the best!
function togglePara(n, m) {
var para = document.getElementById(m + '-para' + n);
para.classList.toggle('active');
}
function showModule(m) {
debugger;
var item = document.getElementById(m);
var other = document.getElementsByClassName('dropdown');
for (var i = 0; i < other.length; i++) {
other[i].style.display = "none";
}
item.style.display = "block";
}
* {
padding: 0;
margin: 0;
font-family: 'montserrat', sans-serif;
}
main {
background-color: salmon;
overflow: auto;
padding-top: 100px;
height: 100vh;
width: 100vw;
}
#accordion {
display: none;
}
.dropdown {
width: auto;
margin: auto;
padding: 2em;
}
section {
margin: auto;
width: 70%;
overflow: hidden;
}
a {
display: block;
width: 100%;
text-align: center;
text-decoration: none;
color: #4673AD;
background-color: #eee;
padding: 1em 0;
position: relative;
z-index: 1;
}
a:hover {
color: #eee;
background-color: #4673AD;
transition: .5s;
}
#keyframes slide{
0% {max-height: 0; padding-top: 0; padding-bottom: 0}
100% {max-height: 300px}
}
p {
display: none;
height: -400px;
padding: 0;
}
.active {
display: block;
background-color: #E5FB8B;
color: #444;
text-align: justify;
padding: 1em;
padding-top: 2em;
position: relative;
z-index: 0;
height: -400px;
animation: slide 1s 1s;
}
nav {
display: none;
}
nav section p {
test-align: center;
}
.buttons {
display: flex;
width: 70%;
margin: 1em auto;
}
.button {
padding: 1em;
border: 2px solid #E5FB8B;
background-color: #E5FB8B;
color: #333;
border-radius: 8px;
width: 40%;
margin: 1em;
}
a.button:hover {
border: 2px solid #4673AD;
color: #e5fb8b;
}
<main>
<div id="accordion" class="dropdown">
<section>
Read Me First
<p id="accordion-para1">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer tempus odio id nisl blandit, pharetra cursus nibh porta. Donec sodales, turpis vitae interdum tincidunt, ante diam scelerisque erat, sed accumsan elit tortor bibendum turpis. In et
tempus est. Quisque dictum aliquet nunc, sed ullamcorper velit pharetra sit amet. Fusce posuere arcu dolor, eget scelerisque tellus bibendum in. Integer eget condimentum arcu. Duis vitae aliquet enim.</p>
</section>
<section>
No, Read <i>Me</i> First
<p id="accordion-para2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer tempus odio id nisl blandit, pharetra cursus nibh porta. Donec sodales, turpis vitae interdum tincidunt, ante diam scelerisque erat, sed accumsan elit tortor bibendum turpis. In et
tempus est. Quisque dictum aliquet nunc, sed ullamcorper velit pharetra sit amet. Fusce posuere arcu dolor, eget scelerisque tellus bibendum in. Integer eget condimentum arcu. Duis vitae aliquet enim.</p>
</section>
<section>
Just Read <i>Me</i>, Please
<p id="accordion-para3">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer tempus odio id nisl blandit, pharetra cursus nibh porta. Donec sodales, turpis vitae interdum tincidunt, ante diam scelerisque erat, sed accumsan elit tortor bibendum turpis. In et
tempus est. Quisque dictum aliquet nunc, sed ullamcorper velit pharetra sit amet. Fusce posuere arcu dolor, eget scelerisque tellus bibendum in. Integer eget condimentum arcu. Duis vitae aliquet enim.</p>
</section>
</div>
<nav id="menu" class="dropdown">
<section>
<a href="javascript:void(0)" onclick=togglePara(1)>Home</a></section>
<section>
Portfolio
<p id="menu-para1">Item one</p>
<p id="menu-para2">Item Two</p>
</section>
<section>
Meet The Team
<p id="menu-para3">John Doe</p>
<p id="menu-para4">Sara Faun</p>
</section>
</nav>
<div class="buttons">
Show Accordion
Show Menu
</div>
</main>

Multiple CSS collapse/expand in same page

I've CSS collapse/expand code refereed from # https://codepen.io/peternguyen/pen/hICga/ . But the problem with my code is that they won't work in same page. I intended to use it at Wordpress page.
Have a look at my code. Thanks.
input {
display: none;
visibility: hidden;
}
label {
font-weight: bold;
font-size: 15px;
display: block;
color: #666;
text-decoration: underline;
}
label:hover {
color: #000;
}
#expand {
height: 0px;
overflow: hidden;
transition: height 0.5s;
color: #000;
}
section {
padding: 0 20px;
}
#toggle:checked ~ #expand {
height: auto;
}
<input id="toggle" type="checkbox">
<label for="toggle">Hidden Kitten</label>
<div id="expand">
<section>
<p>mew</p>
</section>
</div>
<input id="toggle" type="checkbox">
<label for="toggle">Hidden Kitten</label>
<div id="expand">
<section>
<p>mew</p>
</section>
</div>
I made all id-specific parts independent and changed ~ to +.
Working codepen
Code:
#import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700);
body {
font-family: "Open Sans", Arial;
background: #CCC;
}
main {
background: #EEE;
width: 600px;
margin: 20px auto;
padding: 10px 0;
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}
h2 {
text-align: center;
}
p {
font-size: 13px;
}
input {
display: none;
visibility: hidden;
}
label {
display: block;
padding: 0.5em;
text-align: center;
border-bottom: 1px solid #CCC;
color: #666;
}
label:hover {
color: #000;
}
label::before {
font-family: Consolas, monaco, monospace;
font-weight: bold;
font-size: 15px;
content: "+";
vertical-align: text-top;
display: inline-block;
width: 20px;
height: 20px;
margin-right: 3px;
background: radial-gradient(ellipse at center, #CCC 50%, transparent 50%);
}
.expand {
height: 0px;
overflow: hidden;
transition: height 0.5s;
background: url(http://placekitten.com/g/600/300);
color: #FFF;
}
section {
padding: 0 20px;
}
.toggle:checked+label+.expand {
height: 250px;
}
.toggle:checked+label::before {
content: "-";
}
<main>
<h2>CSS Expand/Collapse Section</h2>
<input id="toggle" type="checkbox" checked class="toggle">
<label for="toggle">Hidden Kitten</label>
<div class="expand">
<section>
<p>mew</p>
</section>
</div>
<section>
<h3>Other content</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas porta non turpis faucibus lobortis. Curabitur non eros rutrum, gravida felis non, luctus velit. Ut commodo congue velit feugiat lobortis. Etiam nec dolor quis nulla bibendum blandit
vitae nec enim. Maecenas id dignissim erat. Aenean ac mi nec ante venenatis interdum quis vel lacus.
</p>
<p>Aliquam ligula est, aliquet et semper vitae, elementum eget dolor. In ut dui id leo tristique iaculis eget a dui. Vestibulum cursus, dolor sit amet lacinia feugiat, turpis odio auctor nisi, quis pretium dui elit at est. Pellentesque lacus risus, vulputate
sed gravida eleifend, accumsan ac ante. Donec accumsan, augue eu congue condimentum, erat magna luctus diam, adipiscing bibendum sem sem non elit.</p>
</section>
<input id="toggle2" type="checkbox" checked class="toggle">
<label for="toggle2">Hidden Kitten 2</label>
<section class="expand">
test
</section>
</main>

Why aren't these basic html/css codes working with this specific CMS layout?

It's ancient, but there are still some people who use InsaneJournal (an offshoot of Danga Interactive's LiveJournal), myself included.
I'm trying to add some very basic content organizers; specifically, CSS-only (InsaneJournal prevents the use of jQuery) tabs and a modal window. But I cannot get them to work. I've tested the code snippets in JSFiddle, and they work fine (I'll include the snippets below, too), which makes me think there is something in the pre-made layout I'm using which prevents the snippets from working as expected.
Can anyone offer any insight? The website is here and these are the snippets:
Modal Window:
.modalDialog {
position: fixed;
font-family: Arial, Helvetica, sans-serif;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0, 0, 0, 0.8);
z-index: 99999;
opacity: 0;
-webkit-transition: opacity 400ms ease-in;
-moz-transition: opacity 400ms ease-in;
transition: opacity 400ms ease-in;
pointer-events: none;
}
.modalDialog:target {
opacity: 1;
pointer-events: auto;
}
.modalDialog>div {
width: 400px;
position: relative;
margin: 10% auto;
padding: 5px 20px 13px 20px;
border-radius: 10px;
background: #fff;
background: -moz-linear-gradient(#fff, #999);
background: -webkit-linear-gradient(#fff, #999);
background: -o-linear-gradient(#fff, #999);
}
.close {
background: #606061;
color: #FFFFFF;
line-height: 25px;
position: absolute;
right: -12px;
text-align: center;
top: -10px;
width: 24px;
text-decoration: none;
font-weight: bold;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
-moz-box-shadow: 1px 1px 3px #000;
-webkit-box-shadow: 1px 1px 3px #000;
box-shadow: 1px 1px 3px #000;
}
.close:hover {
background: #00d9ff;
}
<h1>Open Modal</h1>
<div id="openModal" class="modalDialog">
<div> X
<h2>Modal Window</h2>
<p>This is a modal window.</p>
</div>
</div>
CSS Tabs:
.tabs {
color: #333;
font-family: arial, sans-serif;
margin: auto;
font-size: 1em;
width: 80%;
}
.tabs ul.tab-nav {
display: table;
border-spacing: 2px;
list-style: none;
margin: 0;
padding: 0;
width: 100%
}
.tabs ul.tab-nav li {
display: table-cell;
}
.tabs ul.tab-nav li a {
padding: 10px;
background-color: #ccc;
color: #333;
display: block;
font-size: 1.214em;
font-weight: bold;
margin: 2px 0;
padding: 10px;
text-decoration: none;
}
.tabs ul.tab-nav li a:hover {
background-color: #ddd;
}
.tabs section article {
display: none;
padding: 0 5px 0 10px;
}
.tabs section:target article {
display: block;
}
<div class="tabs">
<h1>CSS-only Tabs (POC)</h1>
<ul class="tab-nav">
<li>Option 1</li>
<li>Option 2</li>
<li>Option 3</li>
</ul>
<section id="option1">
<article>
<h2>Heading 1</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque ut lacus vel eros maximus pharetra. Nullam mattis posuere eros, ac pellentesque felis lobortis id. Fusce sed varius mauris. Integer ut pulvinar metus. Vestibulum ?obortis non enim
quis pulvinar. Maecenas et pulvinar mi. Pellentesque gravida eleifend nisl vitae efficitur. Curabitur sit amet convallis elit, sit amet ultrices enim. Integer vitae erat sit amet mi viverra gravida.</p>
</article>
</section>
<section id="option2">
<article>
<h2>Heading 2</h2>
<p>Aenean eu mauris sagittis magna fringilla rhoncus. Mauris ornare felis at rutrum condimentum. Fusce in fermentum ipsum. Duis et dignissim orci, at venenatis urna. Etiam condimentum malesuada placerat. In sollicitudin justo fermentum velit facilisis
aliquam. Duis psuere, neque iaculis dignissim scelerisque, dolor orci vulputate dui, et pulvinar dui ante pharetra ipsum.</p>
</article>
</section>
<section id="option3">
<article>
<h2>Heading 3</h2>
<p>Duis lectus magna, tristique quis tristique ac, eleifend nec sapien. Quisque vel eros nec tortor efficitur malesuada. Suspendisse malesuada, erat eu posuere finibus, velit tellus placerat mauris, id pharetra nunc velit et nisi. Phasellus non diam
sapien. Ut tellus est, tristique sit amet arcu eget, egestas porta sapien. Sed maximus, turpis ut tempor imperdiet, sem nisi lobortis enim, vel ultrices elit turpis eu nisi. Morbi efficitur luctus justo, eget ultrices lorem luctus ac. Quisque
id augue risus. Cras sagittis dapibus sapien vehicula auctor. Nullam iaculis ipsum leo, sed ornare arcu placerat sit amet. Aenean aliquet dictum ligula non rhoncus. Duis lacinia, nisl sed porttitor scelerisque, ex ex viverra massa, sit amet ullamcorper
sem nulla sit amet urna.</p>
</article>
</section>
</div>
These are pasted directly from the code I'm using on my blog. As you can see, they operate (here, in Codepen, in jsFiddle, everywhere) as expected.
I do not see why (or what) would prevent these really very simple codes from operating as they ought to. Can anyone tell me what is going on here? Or point me in the right direction? Or even offer a means of circumventing what's going on here? I'll take any kind of help.
Thank you for your time, and I apologize if this is very simplistic. I'm not very advanced at all (as if that isn't obvious).
EDIT As pointed out by Mehravish Temkar, the div ids are not showing up in the page even after they've been entered. Does anyone know what is removing them from the code? And, for that matter (and just out of curiosity), why they would be removed?

CSS div's border unvisible

Dear more expert Pros!
What I'm unable to achieve - making the mcontent div stylized properly. Actually I have no idea why is not working this very simple css code. The lside and the content div are inside in the mcontent div. I'd like to have the mcontent div left and right border but I can't achieve that. If I take out the content and/or the lside formatting from the css file, the borders seemable. If I format the lside and the content div, the mcontent div even seems to me unvisible. (gave it background color and that is unvisible under these mentioned divs) I have no idea why. I've checked the html file for coding error - I did not discover any problem.
This is the HTML file:
<html>
<head>
<link rel="stylesheet" href="firstsite.css" type="text/css" />
<meta charset="utf-8" />
<title>Website</title>
</head>
<body>
<div id="main">
<div id="header">
<h1>Website</h1>
</div>
<div id="navi">
<ul class="menu">
<li>Menu 1</li>
<li>Menu 2
<ul>
<li>Menu 2_1</li>
<li>Menu 2_2</li>
<li>Menu 2_3</li>
</ul>
</li>
<li>Menu 3
<ul>
<li>Menu 3_1</li>
<li>Menu 3_2</li>
<li>Menu 3_3</li>
<li>Menu 3_4</li>
<li>Menu 3_5</li>
</ul>
</li>
<li>Menu 4</li>
</ul>
</div>
<div id="mcontent">
<div id="lside">
<div id="lside_1">DIV 1
</div>
<div id="lside_2">DIV 2
</div>
<div id="lside_3">DIV 3
</div>
</div>
<div id="content">
<h2 text-aling="center">1. menupoint - no submenu</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis rutrum maximus leo, id euismod enim finibus ac. Fusce velit tortor, tincidunt a commodo et, elementum in enim. Ut eget varius elit, vel fermentum eros. Sed at nulla ornare odio rhoncus hendrerit sit amet nec massa. Integer at ultrices urna. Fusce a libero vel purus fringilla condimentum et sed eros. Fusce vestibulum velit eget libero bibendum maximus. Suspendisse in libero mattis magna fringilla interdum vel quis nulla. Pellentesque dapibus, elit eget efficitur pretium, diam dui luctus massa, non semper elit orci eget mi. Nunc condimentum pretium dapibus. Nulla iaculis urna nec eros commodo, eu lacinia eros ullamcorper. Phasellus euismod rutrum nulla id malesuada. In pellentesque turpis vel vehicula lacinia. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis rutrum maximus leo, id euismod enim finibus ac. Fusce velit tortor, tincidunt a commodo et, elementum in enim. Ut eget varius elit, vel fermentum eros. Sed at nulla ornare odio rhoncus hendrerit sit amet nec massa. Integer at ultrices urna. Fusce a libero vel purus fringilla condimentum et sed eros. Fusce vestibulum velit eget libero bibendum maximus. Suspendisse in libero mattis magna fringilla interdum vel quis nulla. Pellentesque dapibus, elit eget efficitur pretium, diam dui luctus massa, non semper elit orci eget mi. Nunc condimentum pretium dapibus. Nulla iaculis urna nec eros commodo, eu lacinia eros ullamcorper. Phasellus euismod rutrum nulla id malesuada. In pellentesque turpis vel vehicula lacinia. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis rutrum maximus leo, id euismod enim finibus ac. Fusce velit tortor, tincidunt a commodo et, elementum in enim. Ut eget varius elit, vel fermentum eros. Sed at nulla ornare odio rhoncus hendrerit sit amet nec massa. Integer at ultrices urna. Fusce a libero vel purus fringilla condimentum et sed eros. Fusce vestibulum velit eget libero bibendum maximus. Suspendisse in libero mattis magna fringilla interdum vel quis nulla. Pellentesque dapibus, elit eget efficitur pretium, diam dui luctus massa, non semper elit orci eget mi. Nunc condimentum pretium dapibus. Nulla iaculis urna nec eros commodo, eu lacinia eros ullamcorper. Phasellus euismod rutrum nulla id malesuada. In pellentesque turpis vel vehicula lacinia. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
</p>
</div>
</div>
<div id="footer">
<h2>PHP Website by FGB 2016</h2>
</div>
</div>
</body>
and this is the CSS file:
body {
margin: 0px;
padding: 0px;
}
#main {
margin: 0px auto;
padding: 20px;
width: 940px;
border: 1px solid red; /* just for seeing*/
}
#header {
margin: 0px auto;
background-color: #808080;
width: 900px;
border: 1px #808080 solid;
border-bottom: 2px #FA801D solid;
border-radius: 15px 15px 0px 0px;
}
#header h1 {
color: white;
text-align: center;
}
#mcontent {
margin: 0px auto;
width: 892px;
border-left: 5px solid #808080;
border-right: 5px solid #808080;
}
#lside {
margin-left: 10px;
float: left;
width: 200px;
height: auto;
border: 1px solid black;
}
#lside_1 {
border: 1px solid black;
}
#lside_2 {
border: 1px solid black;
}
#lside_3 {
border: 1px solid black;
}
#content {
float: right;
margin-right: 10px;
width: 600px;
padding: 0px 15px;
border: 1px solid;
}
#content h2 {
text-align: center;
}
#content p {
text-align: justify;
}
#footer {
clear: both;
margin: 0px auto;
background-color: #808080;
width: 900px;
height: 60px;
border-width: 0px 1px 1px 1px;
border-style: solid;
line-height: 60px;
border-radius: 0px 0px 15px 15px;
border-top: 10px #FA801D solid;
}
#footer h2 {
margin: 0px;
color: white;
text-align: center;
}
/*
* navi section
*/
.menu {
margin: 0px auto;
height: 40px;
width: 900px;
background: #808080;
padding: 0px;
border-left: 1px solid #808080;
border-right: 1px solid #808080;
border-bottom: 10px #FA801D solid;
}
.menu li {
position: relative;
text-align: center;
list-style: none;
width: 25%;
height: 40px;
float: left;
}
.menu li a {
text-align: center;
display: block;
line-height: 40px;
text-decoration: none;
font-family: Verdana, Tahoma, Geneva, sans-serif;
font-weight: bold;
font-size: 1.2em;
color: white;
transition: .3s background-color;
}
.menu li:hover > a {
background-color: #FA801D;
}
.menu ul {
position: absolute;
padding: 0;
top: 50px;
background: #808080;
opacity: 0;
box-shadow: 3px 3px 3px #888888;
}
.menu li:hover > ul {
opacity:1;
}
.menu ul li {
height:0;
overflow: hidden;
padding: 0;
width: 100%;
border-top: 1px grey solid;
border-bottom: 1px grey solid;
}
.menu li:hover > ul li {
height: 40px;
overflow: visible;
}
/*
* end of navi section
*/
Thank you in advance for your help!
You are trying to style an empty div - no contents inside it but other div(s) - the style won't work until you add content or to give it a height
add min-height:200px; and display: table; to #mcontent to be like this
#mcontent {
margin: 0px auto;
width: 892px;
border-left: 5px solid #808080;
border-right: 5px solid #808080;
min-height:200px;
display: table;
}
here is a fiddle https://jsfiddle.net/majali/vzx80x97/6/
<div id="mcontent" >
<div id="lside">
<div id="lside_1">DIV 1
</div>
<div id="lside_2">DIV 2
</div>
<div id="lside_3">DIV 3
</div>
</div>
<div style="clear:both">
and style :
#mcontent {
margin: 0px auto;
display:inline-block;
border-left: 5px solid #808080;
border-right: 5px solid #808080;
}

Preventing a DIV from overflowing past another div?

From my code and logic, everything seems right. Why on earth would my news DIV overflow onto my Box D, where all the buttons are. It just doesn't make any sense to me.
Here is a pic of the problem:
* {
font-family: Segoe UI;
font-size: 9pt;
box-sizing: border-box;
}
html {
height: 100%;
}
body {
padding: 0;
margin: 0;
background-color: #bbc3cb;
width: 100%;
height: 100%;
}
#main {
border: 1px solid rgb(112, 112, 112);
width: 800px;
height: 650px;
margin: 0 auto;
}
#boxA {
padding-top: 7px;
padding-bottom: 7px;
padding-left: 3px;
border-bottom: 1px solid rgb(180, 180, 180);
background: #FFF;
}
#boxB {
height: 573px;
width: 200px;
border: 0;
float: left;
background: #FFF;
}
#boxC {
background: rgb(240, 240, 240);
height: 573px;
width: 598px;
border-left: 1px solid rgb(180, 180, 180);
border-top: 0;
border-bottom: 0;
border-right: 0;
display: inline-block;
}
#boxD {
background: rgb(240, 240, 240);
border-top: 1px solid rgb(180, 180, 180);
height: 44px;
text-align: center;
display: table;
width: 100%;
;
}
#menu {
list-style-type: none;
padding: 0;
margin: 0;
}
#menu li {
padding: 4px;
border: 1px solid #FFF;
}
#menu li:hover {
cursor: pointer;
}
.selected {
background: rgb(51, 153, 255);
color: #FFF;
border: 1px solid #FFF;
font-weight: bold;
}
.hidden {
display: none;
}
.item {
width: 100%;
height: 100%;
}
input[type="button"] {
cursor: pointer;
border: 1px solid #707070;
background-color: #F0F0F0;
border-radius: 4px;
box-shadow: inset 0 1px 2px #fff, inset 0 -0.7em #DDD;
background-image: -ms-linear-gradient(top, #F1F1F1 0%, #E3E3E3 50%, #D0D0D0 100%);
padding: 3px 6px;
width: 75px;
}
input[type="button"]:hover {
cursor: pointer;
background-color: #EAF6FD;
border: 1px solid #3C7FB1;
box-shadow: inset 0 1px 2px #fff, inset 0 -0.7em #BEE6FD, 0 0 3px #A7D9F5;
}
input[type="button"][disabled],
input[type="button"][disabled]:hover {
border: 1px solid #ADB2B5;
text-shadow: 1px 1px #fff;
cursor: default;
background-color: #F4F4F4;
box-shadow: inset 0 1px 2px #fff;
}
div.frameT {
width: 100%;
padding: 0;
display: table;
height: 100%;
position: absolute;
top: 0;
left: 0;
margin: 0;
}
div.frameTC {
padding: 0;
vertical-align: middle;
display: table-cell;
margin: 0;
}
.section-title {
padding: 0;
margin: 0;
color: rgb(11, 63, 113);
font-weight: bold;
}
#news {
overflow-y: scroll;
height: 100%;
margin-bottom: 5px;
border: 1px solid red;
display: block;
}
<div class="frameT">
<div class="frameTC">
<div id="main">
<div id="boxA"><b>Application Title</b>
</div>
<div id="boxB">
<ul id="menu">
<li data-show="#1">Notes and Updates</li>
<li data-show="#2">Menu Item 2</li>
<li data-show="#3">Menu Item 3</li>
</ul>
</div>
<div id="boxC">
<div id="1" class="hidden item">
<span class="section-title">Notes and Updates</span>
<br>
<div id="news"></div>
</div>
<div id="2" class="hidden item">
Content Tab 2
</div>
<div id="3" class="hidden item">
Content Tab 3
</div>
</div>
<div id="boxD">
<div style="display: table-cell; vertical-align: middle;">
<input type="button" value="Search" class="btn" disabled>
<input type="button" value="Save" class="btn" disabled>
<input type="button" value="Add" class="btn" disabled>
<input type="button" value="Clear All" class="btn">
<input type="button" value="Delete" class="btn" disabled>
<input type="button" value="Export" class="btn" disabled>
<input type="button" value="Recall" class="btn" disabled>
</div>
</div>
<!-- End of Main -->
</div>
</div>
Height and width are always relative to the parent. In this case, your news div will be as tall as boxC. Since you have a title above, the height of this section will be 100% of the parent for news + ~20px for your title.
My suggestion is to set a specific height to your title using display:inline-block and height:20px like this:
.section-title {
padding: 0;
margin: 0;
color: rgb(11, 63, 113);
font-weight: bold;
height: 20px;
display: inline-block;
}
So you know exactly which size it will be on every browsers. Now you can use CSS3 calc function to determine the height of your box like this height:calc(100% - 20px):
#news {
overflow-y: scroll;
height: calc(100% - 20px);
margin-bottom: 5px;
border: 1px solid red;
display: block;
}
You can see this fiddle
Your news div is 100% but you also have this:
<span class="section-title">Notes and Updates</span>
which is taking up some space. You could resize the news div (make is smaller), maybe have the tag in another div that's 10% and make the news div 90%
ETA - or you might want to set the container div overflow-y property to hidden or scroll.
It's simple, just use overflow:auto to do this. Look your example:
* {
font-family: Segoe UI;
font-size: 9pt;
box-sizing: border-box;
}
html {
height:100%;
}
body {
padding: 0;
margin: 0;
background-color: #bbc3cb;
width: 100%;
height: 100%;
}
#main {
border: 1px solid rgb(112,112,112);
width: 800px;
height: 650px;
margin: 0 auto;
}
#boxA {
padding-top: 7px;
padding-bottom: 7px;
padding-left: 3px;
border-bottom: 1px solid rgb(180,180,180);
background: #FFF;
}
#boxB {
height: 573px;
width: 200px;
border: 0;
float: left;
background: #FFF;
}
#boxC {
background: rgb(240,240,240);
max-height: 573px;
width: 598px;
border-left: 1px solid rgb(180,180,180);
border-top: 0;
border-bottom: 0;
border-right: 0;
display: inline-block;
overflow:auto;
}
#boxD {
background: rgb(240,240,240);
border-top: 1px solid rgb(180,180,180);
height: 44px;
text-align: center;
display: table;
width: 100%;;
}
#menu {
list-style-type: none;
padding: 0;
margin: 0;
}
#menu li {
padding: 4px;
border: 1px solid #FFF;
}
#menu li:hover {
cursor: pointer;
}
.selected {
background: rgb(51,153,255);
color: #FFF;
border: 1px solid #FFF;
font-weight: bold;
}
.hidden{ display:none; }
.item {
width: 100%;
height: 100%;
}
input[type="button"]
{
cursor:pointer;
border: 1px solid #707070;
background-color: #F0F0F0;
border-radius: 4px;
box-shadow: inset 0 1px 2px #fff, inset 0 -0.7em #DDD;
background-image: -ms-linear-gradient(top, #F1F1F1 0%, #E3E3E3 50%, #D0D0D0 100%);
padding: 3px 6px;
width: 75px;
}
input[type="button"]:hover
{
cursor:pointer;
background-color: #EAF6FD;
border: 1px solid #3C7FB1;
box-shadow: inset 0 1px 2px #fff, inset 0 -0.7em #BEE6FD, 0 0 3px #A7D9F5;
}
input[type="button"][disabled], input[type="button"][disabled]:hover
{
border: 1px solid #ADB2B5;
text-shadow: 1px 1px #fff;
cursor:default;
background-color: #F4F4F4;
box-shadow: inset 0 1px 2px #fff;
}
div.frameT {
width: 100%;
padding: 0;
display: table;
height: 100%;
position: absolute;
top: 0;
left: 0;
margin: 0;
}
div.frameTC {
padding: 0;
vertical-align: middle;
display: table-cell;
margin: 0;
}
.section-title {
padding:0;
margin:0;
color: rgb(11,63,113);
font-weight: bold;
}
#news {
overflow-y: scroll;
height: 100%;
margin-bottom: 5px;
border: 1px solid red;
display: block;
}
<div class="frameT">
<div class="frameTC">
<div id="main">
<div id="boxA"><b>Application Title</b></div>
<div id="boxB">
<ul id="menu">
<li data-show="#1">Notes and Updates</li>
<li data-show="#2">Menu Item 2</li>
<li data-show="#3">Menu Item 3</li>
</ul>
</div>
<div id="boxC">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam ac blandit sem. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla facilisis lectus vel pharetra tempus. Nulla sagittis enim mauris, vel imperdiet purus lobortis et. Nullam laoreet neque eget lectus finibus mattis. Cras sagittis, tortor vel vehicula placerat, dui sem imperdiet lectus, sit amet ultricies ante est nec elit. Sed consectetur lobortis dui non dictum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
Curabitur elit dui, laoreet in orci et, feugiat malesuada quam. Pellentesque hendrerit diam et leo blandit, non tristique nisi blandit. Praesent ac sem quis turpis euismod malesuada et non justo. Quisque in diam risus. Donec eget sapien at libero ullamcorper sagittis. Integer nunc dolor, suscipit nec tincidunt quis, varius vitae mauris. Quisque malesuada enim ut semper tincidunt.
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris feugiat ullamcorper iaculis. Donec sit amet turpis eu dui eleifend cursus eget a ante. Vivamus nec ligula a nunc consequat luctus a in libero. Nunc eu felis vel ante pellentesque aliquam eu sed augue. Mauris nec mi sit amet quam euismod pulvinar. Donec euismod sollicitudin bibendum. Maecenas accumsan neque vel pulvinar tempor. Morbi sit amet dolor pellentesque, vehicula lectus sit amet, accumsan mauris. Sed aliquam mi imperdiet quam scelerisque, et euismod felis auctor. Curabitur sit amet eros leo.
Duis placerat, ipsum quis lacinia tempus, purus dolor congue quam, eu tempor orci augue et libero. Curabitur ut ullamcorper mauris, tristique sollicitudin nisi. Ut est dolor, varius id tellus a, sagittis eleifend libero. Fusce gravida scelerisque facilisis. Aenean sollicitudin dolor in ante porttitor, ut finibus felis maximus. Morbi aliquet risus lectus. Pellentesque tincidunt enim quis cursus rutrum. Pellentesque at placerat enim, id consequat ex. Praesent justo magna, fermentum non erat in, aliquam euismod velit. Nulla facilisi. Donec mi nulla, bibendum vel nibh varius, consectetur vestibulum nunc. Vestibulum suscipit mollis efficitur.
Nunc dapibus eget nunc non feugiat. Etiam dictum nulla sed gravida volutpat. Quisque non metus tristique, accumsan tortor sed, sollicitudin lorem. Suspendisse facilisis suscipit lacus fringilla pulvinar. Suspendisse placerat condimentum justo, vel mollis ante lacinia non. Sed tempus elementum ligula, pulvinar accumsan justo viverra eu. Suspendisse justo massa, elementum nec hendrerit a, congue nec arcu.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam ac blandit sem. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla facilisis lectus vel pharetra tempus. Nulla sagittis enim mauris, vel imperdiet purus lobortis et. Nullam laoreet neque eget lectus finibus mattis. Cras sagittis, tortor vel vehicula placerat, dui sem imperdiet lectus, sit amet ultricies ante est nec elit. Sed consectetur lobortis dui non dictum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
Curabitur elit dui, laoreet in orci et, feugiat malesuada quam. Pellentesque hendrerit diam et leo blandit, non tristique nisi blandit. Praesent ac sem quis turpis euismod malesuada et non justo. Quisque in diam risus. Donec eget sapien at libero ullamcorper sagittis. Integer nunc dolor, suscipit nec tincidunt quis, varius vitae mauris. Quisque malesuada enim ut semper tincidunt.
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris feugiat ullamcorper iaculis. Donec sit amet turpis eu dui eleifend cursus eget a ante. Vivamus nec ligula a nunc consequat luctus a in libero. Nunc eu felis vel ante pellentesque aliquam eu sed augue. Mauris nec mi sit amet quam euismod pulvinar. Donec euismod sollicitudin bibendum. Maecenas accumsan neque vel pulvinar tempor. Morbi sit amet dolor pellentesque, vehicula lectus sit amet, accumsan mauris. Sed aliquam mi imperdiet quam scelerisque, et euismod felis auctor. Curabitur sit amet eros leo.
Duis placerat, ipsum quis lacinia tempus, purus dolor congue quam, eu tempor orci augue et libero. Curabitur ut ullamcorper mauris, tristique sollicitudin nisi. Ut est dolor, varius id tellus a, sagittis eleifend libero. Fusce gravida scelerisque facilisis. Aenean sollicitudin dolor in ante porttitor, ut finibus felis maximus. Morbi aliquet risus lectus. Pellentesque tincidunt enim quis cursus rutrum. Pellentesque at placerat enim, id consequat ex. Praesent justo magna, fermentum non erat in, aliquam euismod velit. Nulla facilisi. Donec mi nulla, bibendum vel nibh varius, consectetur vestibulum nunc. Vestibulum suscipit mollis efficitur.
Nunc dapibus eget nunc non feugiat. Etiam dictum nulla sed gravida volutpat. Quisque non metus tristique, accumsan tortor sed, sollicitudin lorem. Suspendisse facilisis suscipit lacus fringilla pulvinar. Suspendisse placerat condimentum justo, vel mollis ante lacinia non. Sed tempus elementum ligula, pulvinar accumsan justo viverra eu. Suspendisse justo massa, elementum nec hendrerit a, congue nec arcu.
<div id="1" class="hidden item">
<span class="section-title">Notes and Updates</span>
<br>
<div id="news"></div>
</div>
<div id="2" class="hidden item">
Content Tab 2
</div>
<div id="3" class="hidden item">
Content Tab 3
</div>
</div>
<div id="boxD">
<div style="display: table-cell; vertical-align: middle;">
<input type="button" value="Search" class="btn" disabled>
<input type="button" value="Save" class="btn" disabled>
<input type="button" value="Add" class="btn" disabled>
<input type="button" value="Clear All" class="btn">
<input type="button" value="Delete" class="btn" disabled>
<input type="button" value="Export" class="btn" disabled>
<input type="button" value="Recall" class="btn" disabled>
</div>
</div><!-- End of Main -->
</div>
</div>