Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <section id="myAccordion">
					<div class="flex-container">
						<div class="flex-row title">
							<div class="flex-col-xs-12 text-center">
								<h2 class="font-42">beautiful accordion</h2>
								<p class="blue font-22">made with css</p>
							</div>
						</div>
						<div class="why_choose_us">
<input type="radio" id="Panel_1" name="wiki" value="Panel_1" checked>
<input type="radio" id="Panel_2" name="wiki" value="Panel_2">
<input type="radio" id="Panel_3" name="wiki" value="Panel_3">
<input type="radio" id="Panel_4" name="wiki" value="Panel_4">

<ul class="accordion flex-row">
<div class="flex-col-md-6">
  <li class="panel" data-radio="Panel_1">
    <label for="Panel_1" class="accordion-title">
      
      <span class="accordion-heading">What is the difference in SEO between a guest house site and a site for a gîte?</span>
    </label>
    <div class="accordion-content">onveniently envisioneer enterprise-wide niche markets before long-term high-impact benefits. Seamlessly generate front-end strategic theme areas for leveraged niche markets. Proactively evisculate top-line technologies via focused e-tailers. Conveniently morph end-to-end expertise before fully researched deliverables</div>
  </li>
  <li class="panel" data-radio="Panel_2">
    <label for="Panel_2" class="accordion-title">
    
      <span class="accordion-heading">What is the difference in SEO between a guest house site and a site for a gîte?</span>
    </label>
    <div class="accordion-content">onveniently envisioneer enterprise-wide niche markets before long-term high-impact benefits. Seamlessly generate front-end strategic theme areas for leveraged niche markets. Proactively evisculate top-line technologies via focused e-tailers. Conveniently morph end-to-end expertise before fully researched deliverables.</div>
  </li>
  
  </div>
  <div class="flex-col-md-6">
  <li class="panel" data-radio="Panel_3">
    <label for="Panel_3" class="accordion-title">
     
      <span class="accordion-heading">What is the difference in SEO between a guest house site and a site for a gîte?</span>
    </label>
    <div class="accordion-content">onveniently envisioneer enterprise-wide niche markets before long-term high-impact benefits. Seamlessly generate front-end strategic theme areas for leveraged niche markets. Proactively evisculate top-line technologies via focused e-tailers. Conveniently morph end-to-end expertise before fully researched deliverables.</div>
  </li>
  <li class="panel" data-radio="Panel_4">
    <label for="Panel_4" class="accordion-title">
       <span class="accordion-heading">What is the difference in SEO between a guest house site and a site for a gîte?</span>
    </label>
    <div class="accordion-content">onveniently envisioneer enterprise-wide niche markets before long-term high-impact benefits. Seamlessly generate front-end strategic theme areas for leveraged niche markets. Proactively evisculate top-line technologies via focused e-tailers. Conveniently morph end-to-end expertise before fully researched deliverables.</div>
  </li>
    </div>
</ul>
</div>
</div>
</section>
              
            
!

CSS

              
                body{
overflow-y: scroll;
background-image: linear-gradient(to right top, #717171, #7a7a85, #82839b, #878db1, #8998c8, #83a4d9, #78b1e9, #69bff8, #52cffe, #41dfff, #46eefa, #5ffbf1);

}
.flex-container {
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0 1em;
}

@media(min-width:540px) {
    .flex-container {
        max-width: 540px;
    }
}

@media(min-width:768px) {
    .flex-container {
        max-width: 768px;
    }
}

@media(min-width:992px) {
    .flex-container {
        max-width: 992px;
    }
}

@media(min-width:1200px) {
    .flex-container {
        max-width: 1200px;
    }
}

.flex-column {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    margin-bottom: 1em;
}

.flex-row {
    display: flex;
    flex-wrap: wrap;
    box-sizing: border-box;
    margin-bottom: 1em;
}

.flex-col-md-6 {
    box-sizing: border-box;
    width: 100%;
    padding: 1em;
}
.flex-col-xs-12{
   box-sizing: border-box;
    width: 100%;
    padding: 1em;
   width: calc(100% * (12 / 12) );
        max-width: calc(100% * ( 12/ 12) );
}
@media(min-width:992px) {
    .flex-col-md-6 {
        width: calc(100% * (6 / 12) );
        max-width: calc(100% * (6 / 12) );
    }
}

/*ACCORION 1*/

.accordion {
    position: relative;
    margin: 0;
  padding: 0;
}

input[type="radio"] {
    position: absolute;
    left: -9999px;
}

.accordion label {
    text-align: center;
}

.accordion li,
.accordion .accordion-title {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;
}

.accordion .accordion-title {
    margin: 0;
    padding: 30px;
    color: #8a8a8a;
}

.accordion li {
    margin-bottom: 33px;
    -webkit-box-shadow: 5px 5px 15px 5px rgba(0,0,0,0.42);
    box-shadow: 5px 3px 12px 5px rgba(0,0,0,0.1);
  background-color: aliceblue;
}

.accordion .accordion-heading {
    text-decoration: none;
    color: #717171;
}

.accordion .accordion-heading:before {
    content: "+";
    float: left;
    margin-right: 25px;
    padding: 6px 10px;
    font-size: 20px;
    color: #fff;
    background-color: #93c04d;
}

.accordion .accordion-content {
    display: none;
    position: relative;
    flex-grow: 1;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 30px;
    transiton: all .5s;
}

.accordion .accordion-content:before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    width: 80%;
    height: 1px;
    margin: 0 auto;
    background-color: #717171;
}
}

[value="Panel_1"]:checked ~ .accordion [data-radio="Panel_1"],
[value="Panel_2"]:checked ~ .accordion [data-radio="Panel_2"],
[value="Panel_3"]:checked ~ .accordion [data-radio="Panel_3"],
[value="Panel_4"]:checked ~ .accordion [data-radio="Panel_4"] {
    flex-grow: 1;
}

[value="Panel_1"]:checked ~ .accordion [for="Panel_1"] + .accordion-content,
[value="Panel_2"]:checked ~ .accordion [for="Panel_2"] + .accordion-content,
[value="Panel_3"]:checked ~ .accordion [for="Panel_3"] + .accordion-content,
[value="Panel_4"]:checked ~ .accordion [for="Panel_4"] + .accordion-content {
    display: flex;
}

[value="Panel_1"]:checked ~ .accordion [data-radio="Panel_1"] .accordion-heading:before,
[value="Panel_2"]:checked ~ .accordion [data-radio="Panel_2"] .accordion-heading:before,
[value="Panel_3"]:checked ~ .accordion [data-radio="Panel_3"] .accordion-heading:before,
[value="Panel_4"]:checked ~ .accordion [data-radio="Panel_4"] .accordion-heading:before {
    content: "-";
    float: left;
    margin-right: 25px;
    padding: 6px 10px;
    font-size: 20px;
    color: #fff;
    background-color: #0098db;
}
              
            
!

JS

              
                
              
            
!
999px

Console