Skip to content

Instantly share code, notes, and snippets.

@leechy
Created June 14, 2012 10:34
Show Gist options
  • Save leechy/2929503 to your computer and use it in GitHub Desktop.
Save leechy/2929503 to your computer and use it in GitHub Desktop.
Блок по центру экрана, с максимальной шириной и ограничением
/**
* Блок по центру экрана, с максимальной шириной и ограничением
*/
/* стили для блока с ограничением */
.b-limited-content {
max-width: 1000px;
margin: 0 auto 1.2em 200px;
height: 100px;
background: rgb(0, 127, 255);
}
/* вспомагательные стили */
body {
margin: 0;
}
.b-layout {
position: relative;
min-width: 800px;
overflow: hidden;
}
.b-content {
max-width: 1200px;
margin: 0 auto 1.2em;
height: 100px;
background: rgb(255, 200, 200);
}
.b-limit {
position: absolute;
top: 0;
left: 0;
width: 197px;
height: 300px;
border-right: 3px dashed red;
}
<div class="b-layout">
<div class="b-content">
<div style="float: left; color: black;">&laquo;</div>
<div style="float: right; color: black;">&raquo;</div>
</div>
<!-- необходимо править как раз b-limited-content, допускается добавление дополнительных элементов -->
<div class="b-limited-content">
<div style="float: left; color: white;">&laquo;</div>
<div style="float: right; color: white;">&raquo;</div>
</div>
<div class="b-limit"></div>
</div>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment