<html>
<head>
<title>Испытание: строим сетку</title>
<meta charset="utf-8">
</head>
<body>
<div class="header">
<div class="column-header positioner T">Header</div>
</div>
<div class="menu">
<div class="column-menu positioner T">Menu</div>
</div>
<div class="promo T">
<div class="positioner">
<div class="column-promo T">Promo 1</div>
<div class="column-promo T">Promo 2</div>
</div>
</div>
<div class="columns">
<div class="positioner">
<div class="column Left T">Left</div>
<div class="column Main T">Main</div>
<div class="column Right T">Right</div>
</div>
</div>
<div class="footer">
<div class="column-footer positioner T">Footer</div>
</div>
</body>
</html>
html, body{
margin:0;
padding:0;
}
body{
width:450px;
height:335px;
font-family:'Arial', sans-serif;
font-size:10px;
color:white;
}
/*
Используемые цвета:
#34495e - мокрый асфальт
#c0392b - красный
#3498DB - синий
*/
* {
box-sizing: border-box; /*решил не мучиться*/
}
.T { /*задает нужный отступ везде где требуется для Tекста*/
padding: 5px 5px;
}
.header {
background-color: #34495e;
padding: 10px;
}
.column-header {
background-color: #c0392b;
min-height: 35px;
}
.menu {
background-color: #3498DB;
}
.column-menu {
min-height: 35px;
}
.promo {
background-color: #34495e;
padding: 10px;
}
.column-promo {
width: 170px;
margin-right: 10px;
float: left;
background-color: #c0392b;
min-height: 60px;
}
.column-promo:last-child {
margin-right: 0px;
}
.column {
background-color: #3498DB;
margin: 10px 0;
min-height: 110px;
}
.Left {
width: 70px;
margin-right: 10px;
float: left;
}
.Main {
width: 54.29%;
float: left;
}
.Right {
width: 70px;
float: right;
margin-left: 10px;
}
.footer {
background-color: #34495e;
}
.column-footer {
min-height: 35px;
}
.positioner {
width: 350px;
margin: 0 auto; /*центрование блока*/
border: none; /*замените на "2px dotted green", чтобы*/ /*понять как работает позиционер*/
}
.positioner:after {
content:'';
display: table;
clear: both;
Output
This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account
Dismiss xKeyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |