Tuesday, 29 December 2015

CODE PEN LAYOUT



-----------------------------------------------------------------------------------------------------------------------
READ MORE:
http://learn.shayhowe.com/html-css/positioning-content/
http://codepen.io/shayhowe/pen/IvFpr

------------------------------------------------------------------------------------------------------------------------
CODE 1:
------------------------------------------------------------------------------------------------------------------------
<html>
<head>
<style class="cp-pen-styles">code {
background: #2db34a;
border-radius: 6px;
color: #fff;
display: block;
font: 14px/24px "Source Code Pro", Inconsolata, "Lucida Console", Terminal, "Courier New", Courier;
padding: 24px 15px;
text-align: center;
}
header,
section,
aside,
footer {
margin: 0 1.5% 24px 1.5%;
}
footer {
margin-bottom: 0;
}
</style>
</head>
<body>
<header>
<code>&#60;header&#62;</code>
</header>
<section>
<code>&#60;section&#62;</code>
</section>
<aside>
<code>&#60;aside&#62;</code>
</aside>
<footer>
<code>&#60;footer&#62;</code>
</footer>
</body>
</html>
-----------------------------------------------------------------------------------------------------------------------
CODE 2:
-----------------------------------------------------------------------------------------------------------------------


-----------------------------------------------------------------------------------------------------------------------

<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<meta name="google" value="notranslate">
<title>CodePen - Layout without Floats</title>
<style>
code {
background: #2db34a;
border-radius: 6px;
color: #fff;
display: block;
font: 14px/24px "Source Code Pro", Inconsolata, "Lucida Console", Terminal, "Courier New", Courier;
padding: 24px 15px;
text-align: center;
}
header,
section,
aside,
footer {
margin: 0 1.5% 24px 1.5%;
}
section {
float: left;
width: 63%;
}
aside {
float: right;
width: 30%;
}
footer {
clear: both;
margin-bottom: 0;
}
</style>
</head>
<body>
<header>
<code>&#60;header&#62;</code>
</header>
<section>
<code>&#60;section&#62;</code>
</section>
<aside>
<code>&#60;aside&#62;</code>
</aside>
<footer>
<code>&#60;footer&#62;</code>
</footer>
</body>
</html>
------------------------------------------------------------------------------------------------------------------------
CODE 3:
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------

<!DOCTYPE html>
<html>
<head>
<style class="cp-pen-styles">
code {
background: #2db34a;
border-radius: 6px;
color: #fff;
display: block;
font: 14px/24px "Source Code Pro", Inconsolata, "Lucida Console", Terminal, "Courier New", Courier;
padding: 24px 15px;
text-align: center;
}
header,
section,
aside,
footer {
margin: 0 1.5% 24px 1.5%;
}
section {
float: left;
width: 30%;
}
footer {
clear: both;
margin-bottom: 0;
}
</style>
</head>
<body>
<header>
<code>&#60;header&#62;</code>
</header>
<section>
<code>&#60;section&#62; <br> float: left;</code>
</section>
<section>
<code>&#60;section&#62; <br> float: left;</code>
</section>
<section>
<code>&#60;section&#62; <br> float: left;</code>
</section>
<footer>
<code>&#60;footer&#62;</code>
</footer>
</body>
</html>
------------------------------------------------------------------------------------------------------------------------
CODE 4:
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
<!DOCTYPE html>
<html>
<head>
<style class="cp-pen-styles">
code {
background: #2db34a;
border-radius: 6px;
color: #fff;
display: block;
font: 14px/24px "Source Code Pro", Inconsolata, "Lucida Console", Terminal, "Courier New", Courier;
padding: 24px 15px;
text-align: center;
}
.default {
background: none;
color: #666;
}
.group:before,
.group:after {
content: "";
display: table;
}
.group:after {
clear: both;
}
.group {
background: #eaeaed;
border-radius: 6px;
clear: both;
*zoom: 1;
}
.group,
header,
section,
aside,
footer {
margin: 0 1.5% 24px 1.5%;
}
section {
float: left;
width: 63%;
}
aside {
float: right;
width: 30%;
}
footer {
margin-bottom: 0;
}
</style>
</head>
<body>
<header>
<code>&#60;header&#62;</code>
</header>
<div class="group">
<code class="default">&#60;section="group"&#62;</code>
<section>
<code>&#60;section&#62; <br> float: left;</code>
</section>
<aside>
<code>&#60;aside&#62; <br> float: right;</code>
</aside>
</div>
<footer>
<code>&#60;footer&#62; <br> clear: both;</code>
</footer>
</body>
</html>



0 comments:

Post a Comment

FB Gadgets | Template Designed by Fatakat PhotosCoolBThemes.com
Code by : paid web directory

https://www.google.co.uk/search?q=site%3Ablogspot.com+fbgadgets