Skip to content

Instantly share code, notes, and snippets.

@exarcheia-web
exarcheia-web / dabblet.css
Last active November 29, 2016 18:15
Flexbox slightly more advanced example
/* Flexbox slightly more advanced example */
body { margin: 0; }
.canvas {
background: hotpink;
width: 100vw;
height: 100vh;
display: flex; /* This does all the magic!!! */
justify-content: flex-end; /* position items along the MAIN axis - default: horizontal */
@exarcheia-web
exarcheia-web / dabblet.css
Last active November 23, 2016 06:13
Basic flexbox 3-column example
/* Basic flexbox 3-column example */
body, p {
margin: 0;
}
.content {
display: flex;
justify-content: space-between; /* center, flex-start (default), flex-end, space-around, space-between */
align-items: stretch; /* center, flex-start, flex-end, stretch (default), baseline */
@exarcheia-web
exarcheia-web / dabblet.css
Last active November 23, 2016 06:09
Updated version of background-attachment: fixed
/* Updated version of background-attachment: fixed */
body {
font-family: "Georgia", serif;
margin: 0;
}
h1 {
margin: 0
}
@exarcheia-web
exarcheia-web / dabblet.css
Last active November 22, 2016 16:53
Example possibilities with background-attachement: fixed
/* Example possibilities with background-attachement: fixed */
body {
margin: 0;
}
.bg {
width: 100%;
padding-top: 15%;
background-color: red;
@exarcheia-web
exarcheia-web / dabblet.css
Last active November 22, 2016 09:00
Resizing while maintaining a set aspect ratio
/* Resizing while maintaining a set aspect ratio */
.container {
width: 500px; /* you only need to change this to resize the element */
}
.container .ratio-4-3 {
width: 100%;
padding-top: 56.25%; /* set your aspect ratio by changing this... currently set to 16:9 aspect ratio */
position: relative;
@exarcheia-web
exarcheia-web / css-starter
Created December 9, 2014 16:19
CSS Starter
* {
margin: 0;
padding: 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
/*** BEGIN MAIN CSS ***/
@exarcheia-web
exarcheia-web / html-starter
Created December 9, 2014 15:56
HTML Basic Structure
<!doctype html>
<html>
<head>
<title>CSS Grids</title>
<meta charset="utf-8">
</head>
<body>
</body>
</html>
@exarcheia-web
exarcheia-web / dabblet.css
Created April 8, 2014 17:30
MODULES BUILT AROUND THE EM UNIT
/* MODULES BUILT AROUND THE EM UNIT */
*, *:before, *:after {
box-sizing: border-box;
}
body {
font-family: Georgia, serif;
margin-top: 50px;
}
@exarcheia-web
exarcheia-web / dabblet.css
Created February 6, 2014 09:53
SVG example
/* SVG example */
/* http://webdesign.tutsplus.com/articles/getting-started-with-scalable-vector-graphics-svg--webdesign-7515 */
#svg {
background: rgba(0,0,0,0.2);
height: 230px;
width: 230px;
}
#line1 {
stroke:rgb(0,0,0);
@exarcheia-web
exarcheia-web / dabblet.css
Last active August 29, 2015 13:56
Basic two-column (float) layout
/* Basic two-column (float) layout */
* {
box-sizing: border-box;
}
.section-main {
width: 800px;
margin: 40px auto;
overflow: hidden;