Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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

              
                <!--
POSITIONNEMENT DES ITEMS DANS LES CELLULES SUR L'AXE DES LIGNES
-->

<section>

	<div id="container">

		<div id="c1">
			<div id="i1"></div>
		</div>

	</div>
	
</section>


<section>

	<div id="container">

		<div id="c2">
			<div id="i2"></div>
		</div>

	</div>

</section>


<section>

	<div id="container">

		<div id="c3">
			<div id="i3"></div>
		</div>

	</div>
	

</section>

<!--
POSITIONNEMENT DES ITEMS DANS LES CELLULES SUR L'AXE DES COLONNES
-->

<section>

	<div id="container">

		<div id="c4">
			<div id="i4"></div>
		</div>
	</div>

</section>


<section>

	<div id="container">

		<div id="c5">
			<div id="i5"></div>
		</div>

	</div>

</section>



<section>

	<div id="container">

		<div id="c6">
			<div id="i6"></div>
		</div>

	</div>

</section>
              
            
!

CSS

              
                body {
	margin: 0;
}

/*la section sert à aligner la grille au centre*/
section {
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	border: 2px solid #f7f7f7;
}

/*optionel (sert à changer la couleur de fond une section sur deux)*/
section:nth-child(2n) {
	background: #f7f7f7;
}

/*la grille est un carré de 30px x 300px*/
#container {
	display: grid;
	grid-template-columns: 300px;
	grid-template-rows: 300px;
	border: 1px solid #263238;
	background: white;
}


/*
POSITIONNEMENT DES ITEMS DANS LES CELLULES SUR L'AXE DES LIGNES
*/


/*la cellule c1*/
#c1 {
	justify-self: start; /*alignement au début gauche de la cellule*/
}
/*l'item i1 dans la cellule c1*/
#i1 {
	width: 100px;
	height: 300px;
	background-color: #ffffff;
	opacity: 1;
	background-size: 11px 11px;
	background-image: repeating-linear-gradient(
		45deg,
		#ff3838 0,
		#ff3838 1.1px,
		#ffffff 0,
		#ffffff 50%
	);
}

/*la cellule c2*/
#c2 {
	justify-self: end; /*alignement à la fin de la cellule*/
}
/*l'item i2 dans la cellule c2*/
#i2 {
	width: 100px;
	height: 300px;
	background-color: #ffffff;
	opacity: 1;
	background-size: 11px 11px;
	background-image: repeating-linear-gradient(
		45deg,
		#ff3838 0,
		#ff3838 1.1px,
		#ffffff 0,
		#ffffff 50%
	);
}

/*la cellule c3*/
#c3 {
	justify-self: center; /*alignement au centrer de la cellule*/
}
/*l'item i3 dans la cellule c3*/
#i3 {
	width: 100px;
	height: 300px;
	background-color: #ffffff;
	opacity: 1;
	background-size: 11px 11px;
	background-image: repeating-linear-gradient(
		45deg,
		#ff3838 0,
		#ff3838 1.1px,
		#ffffff 0,
		#ffffff 50%
	);
}

/*
POSITIONNEMENT DES ITEMS DANS LES CELLULES SUR L'AXE DES COLONNES
*/

/*la cellule c4*/
#c4 {
	align-self: start; /*alignement en haut de la cellule*/
}
/*l'item i4 dans la cellule c4*/
#i4 {
	width: 300px;
	height: 100px;
background-color: #ffffff;
opacity: 1;
background-size: 11px 11px;
background-image: repeating-linear-gradient(-45deg, #5993fd 0, #5993fd 1.1px, #ffffff 0, #ffffff 50%);
}


/*la cellule c5*/
#c5 {
	 align-self: end; /*alignement en bas de la cellule*/
}
/*l'item i5 dans la cellule c5*/
#i5 {
	width: 300px;
	height: 100px;
background-color: #ffffff;
opacity: 1;
background-size: 11px 11px;
background-image: repeating-linear-gradient(-45deg, #5993fd 0, #5993fd 1.1px, #ffffff 0, #ffffff 50%);
}


/*la cellule c6*/
#c6 {
	 align-self: center; /*alignement au centre de la cellule*/
}
/*l'item i6 dans la cellule c6*/
#i6 {
	width: 300px;
	height: 100px;
background-color: #ffffff;
opacity: 1;
background-size: 11px 11px;
background-image: repeating-linear-gradient(-45deg, #5993fd 0, #5993fd 1.1px, #ffffff 0, #ffffff 50%);
}
              
            
!

JS

              
                
              
            
!
999px

Console