cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <html lang="en">
	<head>
		<meta charset="utf-8">
		<title>Responsive and Semantic CSS Grid CSS-Driven</title>
	</head>
	<body>
		<header>
			<div class="brand">
				
				<div class="logo component">
					<h3>Bruno Lesieur</h3>
				</div>

			</div>
			<div class="slogan">
				
				<div class="markdown component">
					<p>Some #ID with lot of .CLASS</p>
				</div>

			</div>
			<div class="title">
				
				<div class="logo component">
					<h1>Quelque #ID et beaucoup de .CLASS</h1>
				</div>	

			</div>
			<nav class="main-nav">
				
				<div class="navigation component">
					<ul>
						<li><a href="">Home</a></li>
						<li><a href="">Section A</a></li>
						<li><a href="">Section B</a></li>
						<li><a href="">Section C</a></li>
					</ul>
				</div>		

			</nav>
		</header>
		<div class="content">
			<section class="overview">
				
				<div class="carousel component">
					<h1>Slide 1</h1>
					<p>Bla bla bla</p>
				</div>	

			</section>
			<nav class="anchor-nav">
				
				<div class="navigation component">
					<h2>Summary</h2>
					<ul>
						<li>
							<a href="#h1-title">H1 Title</a>
							<ul>
								<li>
									<a href="#h2-title">H2 Title</a>
									<ul>
										<li><a href="#h3-title-1">H3 Title 1</a></li>
										<li><a href="#h3-title-2">H3 Title 1</a></li>
									</ul>
								</li>
							</ul>
						</li>
					</ul>
				</div>

			</nav>
			<article class="main">
				<div class="article">

					<div class="markdown component">
						<header>
							<h1 id="h1-title">H1 Title</h1>
							<p>This is a leading text for my article</p>
						</header>

						<h2 id="h2-title">H2 Title</h2>
						<p>Bla bla bla</p>

						<h3 id="h3-title-1">H3 Title 1</h3>
						<p>Bla bla bla</p>

						<h3 id="h3-title-2">H3 Title 2</h3>
						<p>Bla bla bla</p>

						<header>
							<footer>
								<p>by <a href="">Haeresis</a></p>
								<p>date, etc</a></p>
							</footer>
						</header>
					</div>

				</div>
				<ul class="step-list">
					<li class="step">

						<div class="markdown component">
							<h3>H3 Step</h3>
							<p>Bla bla bla</p>
						</div>

					</li>
					<li class="step">
						
						<div class="markdown component">
							<h3>H3 Step</h3>
							<p>Bla bla bla</p>
						</div>

					</li>
					<li class="step">
						
						<div class="markdown component">
							<h3>H3 Step</h3>
							<p>Bla bla bla</p>
						</div>

					</li>
				</ul>
			</article>
			<ul class="call-to-action-list">
				<li class="call-to-action">
					
					<div class="markdown component">
						<h2>H2 Action</h2>
						<p>Bla bla bla</p>
					</div>

				</li>
				<li class="call-to-action">
		
					<div class="markdown component">
						<h2>H2 Action</h2>
						<p>Bla bla bla</p>
					</div>			

				</li>
				<li class="call-to-action">
		
					<div class="markdown component">
						<h2>H2 Action</h2>
						<p>Bla bla bla</p>
					</div>			

				</li>
			</ul>
		</div>
		<footer>
			<nav class="secondary-nav">
				
				<div class="navigation component">
					<ul>
						<li>
							<a href="">Contact us</a>
						</li>
					</ul>
				</div>

			</nav>
			<div class="utils">
				
				<div class="markdown component">
					<p>Join us on Google+</p>
				</div>	

			</div>
			<div class="legals">
				
				<div class="markdown component">
					<p>©All Right not reserved at all</p>
				</div>	

			</div>
		</footer>
	<body>
</html>
            
          
!
            
              /*------------------------------------*\
    $SUMMARY
\*------------------------------------*/

/**
 * SUMMARY.................It's me !
 * RESET...................Same render for all browser.
 * TEST....................Some activable or desactivale CSS rules for debug.
 * GRID....................Grid base 12 columns.
 * ALIGNMENT...............Align content of colums.
 * VISTIBLE / HIDDEN.......Hide / Display colums.
 */





/*------------------------------------*\
    $RESET
\*------------------------------------*/

* {
    -webkit-box-sizing: border-box;
       -moz-box-sizing: border-box;
            box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
}





/*------------------------------------*\
    $TEST
\*------------------------------------*/

.brand:before,
.slogan:before,
.title:before,
.main-nav:before,
.overview:before,
.anchor-nav:before,
.main:before,
.call-to-action:before,
.secondary-nav:before,
.legals:before,
.utils:before {
   width: 100%;
   display: inline-block;
}

.brand:before {
    content: "Brand";
   background-color: rgba(0, 0, 150, 0.5);
}
.slogan:before {
   content: "Slogan";
   background-color: rgba(150, 150, 0, 0.5);
}
.title:before {
   content: "Title";
   background-color: rgba(255, 0, 0, 0.2);
}
.main-nav:before {
   content: "Nav";
   background-color: rgba(0, 255, 0, 0.2);
}
.overview:before {
   content: "Overview";
   background-color: rgba(150, 0, 0, 0.5);
}
.anchor-nav:before {
   content: "Anchor nav";
   background-color: rgba(0, 0, 255, 0.2);
}
.main:before {
   content: "Main";
   background-color: rgba(255, 255, 0, 0.2);
}
.call-to-action:before {
   content: "Call to action";
   background-color: rgba(255, 0, 255, 0.2);
}
.secondary-nav:before {
   content: "Secondary nav";
   background-color: rgba(0, 150, 0, 0.5);
}
.legals:before {
   content: "Legals";
   background-color: rgba(0, 255, 255, 0.2);
}
.utils:before {
   content: "Utils";
   background-color: rgba(150, 0, 150, 0.5);
}
.main:before {
  content: none;
}
.article:before {
  content: "Article";
  background-color: rgba(255, 255, 0, 0.2);
  width: 100%;
  display: inline-block;
}
.step:before {
  content: "Step";
  background-color: rgba(0, 255, 0, 0.2);
  width: 100%;
  display: inline-block;
}





/*------------------------------------*\
    $GRID
\*------------------------------------*/

/*
.span12-12 { width: 100%; }
.span12-11 { width: 91.66666667%; }
.span12-10 { width: 83.33333333%; }
.span12-9 { width: 75%; }
.span12-8 { width: 66.66666667%; }
.span12-7 { width: 58.33333333%; }
.span12-6 { width: 50%; }
.span12-5 { width: 41.66666667%; }
.span12-4 { width: 33.33333333%; }
.span12-3 { width: 25%; }
.span12-2 { width: 16.66666667%; }
.span12-1 { width: 8.33333333%; }

.pull12-12 { right: 100%; }
.pull12-11 { right: 91.66666667%; }
.pull12-10 { right: 83.33333333%; }
.pull12-9 { right: 75%; }
.pull12-8 { right: 66.66666667%; }
.pull12-7 { right: 58.33333333%; }
.pull12-6 { right: 50%; }
.pull12-5 { right: 41.66666667%; }
.pull12-4 { right: 33.33333333%; }
.pull12-3 { right: 25%; }
.pull12-2 { right: 16.66666667%; }
.pull12-1 { right: 8.33333333%; }
.pull12-0 { right: 0; }

.push12-12 { left: 100%; }
.push12-11 { left: 91.66666667%; }
.push12-10 { left: 83.33333333%; }
.push12-9 { left: 75%; }
.push12-8 { left: 66.66666667%; }
.push12-7 { left: 58.33333333%; }
.push12-6 { left: 50%; }
.push12-5 { left: 41.66666667%; }
.push12-4 { left: 33.33333333%; }
.push12-3 { left: 25%; }
.push12-2 { left: 16.66666667%; }
.push12-1 { left: 8.33333333%; }
.push12-0 { left: 0; }

.prepend12-12 { margin-left: 100%; }
.prepend12-11 { margin-left: 91.66666667%; }
.prepend12-10 { margin-left: 83.33333333%; }
.prepend12-9 { margin-left: 75%; }
.prepend12-8 { margin-left: 66.66666667%; }
.prepend12-7 { margin-left: 58.33333333%; }
.prepend12-6 { margin-left: 50%; }
.prepend12-5 { margin-left: 41.66666667%; }
.prepend12-4 { margin-left: 33.33333333%; }
.prepend12-3 { margin-left: 25%; }
.prepend12-2 { margin-left: 16.66666667%; }
.prepend12-1 { margin-left: 8.33333333%; }
.prepend12-0 { margin-left: 0; }

.append12-12 { margin-right: 100%; }
.append12-11 { margin-right: 91.66666667%; }
.append12-10 { margin-right: 83.33333333%; }
.append12-9 { margin-right: 75%; }
.append12-8 { margin-right: 66.66666667%; }
.append12-7 { margin-right: 58.33333333%; }
.append12-6 { margin-right: 50%; }
.append12-5 { margin-right: 41.66666667%; }
.append12-4 { margin-right: 33.33333333%; }
.append12-3 { margin-right: 25%; }
.append12-2 { margin-right: 16.66666667%; }
.append12-1 { margin-right: 8.33333333%; }
.append12-0 { margin-right: 0; }

.pull-push { position: relative; }
.gutter { padding-left: 16px; padding-right: 16px; }
.pull-push-reset { position: static; }
.gutter-reset { padding-left: 0; padding-right: 0; }
.list-reset { margin: 0;padding: 0;list-style-type: none; }
.clearfix { clear: both; }
*/

body > header,
body > footer,
.content {
  max-width: 1200px;
  margin-left:auto;
  margin-right:auto;
}

    body > header:after,
    body > footer:after,
    .content:after,
.grid:after {
    content: "";
    clear: both;
    display: block;
}

    .brand,
    .slogan,
    .title,
    .main-nav,
    .overview,
    .anchor-nav,
    .main,
    .article,
    .step,
    .call-to-action,
    .secondary-nav,
    .utils,
    .legals,
.column {
    float: left;
    width: 100%;
}

/* Mobile / Small tablet */
  .brand,
  .slogan,
  .title,
  .main-nav,
  .overview,
  .anchor-nav,
   .article,
  .step,
  .call-to-action,
  .secondary-nav,
  .utils,
  .legals,
.gutter { padding-left: 16px; padding-right: 16px; }

    .step-list,
    .call-to-action-list,
.list-reset { margin: 0;padding: 0;list-style-type: none; }

    .title,
.clearfix { clear: both; }

/* Tablet / Small desktop */
@media (min-width: 768px) {
  .brand,
  .title,
.span12-2 { width: 16.66666667%; }
  .anchor-nav,
  .utils,
.span12-3 { width: 25%; }
  .step,
.span12-4 { width: 33.33333333%; }  
  .call-to-action,
.span12-6 { width: 50%; }
  .legals,
  .main,
.span12-9 { width: 75%; }
  .main-nav,
  .slogan,
.span12-10 { width: 83.33333333%; }

  .utils,
  .legals,
  .brand,
  .slogan,
.pull-push { position: relative; }

  .utils,
.push12-9 { left: 75%; }
  .brand,
.push12-10 { left: 83.33333333%; }
  .slogan,
.pull12-2 { right: 16.66666667%; }
  .legals,
.pull12-3 { right: 25%; }
}

/* Desktop */
@media (min-width: 992px) {
  .anchor-nav,  
  .call-to-action,
.span12-4 { width: 33.33333333%; }
  .main,
.span12-8 { width: 66.66666667%; }
}

/* Large desktop */
@media (min-width: 1200px) {
  .anchor-nav,
.span12-3 { width: 25%; }
  .call-to-action,
.span12-4 { width: 33.33333333%; }
  .main,
.span12-9 { width: 75%; }

    .call-to-action:nth-child(odd),
.prepend12-2 { margin-left: 16.66666667%; }
/**/
    .call-to-action:nth-child(even),
.append12-2 { margin-right: 16.66666667%; }
}





/*------------------------------------*\
    $ALIGMENT
\*------------------------------------*/

/*
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }
*/

/* Mobile / Small tablet */
    .utils,
.text-center { text-align: center; }

/* Tablet / Small desktop */
@media (min-width: 768px) {
    .brand,
   .utils,
.text-right { text-align: right; }
}




  
/*------------------------------------*\
    $VISTIBLE / HIDDEN
\*------------------------------------*/

/*
.display-block, visible { display: block; }
.display-inline { display: inline-block; }
.display-inline-block { display: inline-block; }
...
.display-none, hidden { display: none; }
*/

/* Mobile / Small tablet */
    .step,
.display-none, hidden { display: none; }

/* Tablet / Small desktop */
@media (min-width: 768px) {
    .step,
.display-block, visible { display: block; }
    .call-to-action:nth-child(n + 3),
.display-none, hidden { display: none; }
}

/* Desktop */
@media (min-width: 992px) {
    .call-to-action:nth-child(n + 3),
.display-block, visible { display: block; }
}

/* Large desktop */
@media (min-width: 1200px) {
    .call-to-action:nth-child(n + 3),
.display-none, hidden { display: none; }
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console