Я хочу, чтобы основной текст HTML (div.main) был близок к стандартному размеру бумаги (8,5 дюйма - 1 дюйм на обоих = 6,5)
Я хочу, чтобы мое боковое меню было за пределами этого. Итак, я понял, как заблокировать страницу с разрешением около 1024 (я использую 996 пикселей, поэтому у меня есть место для вертикальной полосы прокрутки)
Это выглядит довольно хорошо при разрешении ширины 1024 и 1280, но я не уверен насчет более высокого. Также, возможно, у вас, ребята, есть предложение, как лучше выровнять это (удерживая 6,5 дюймов в центре)
index.html
<div>
<div class="menu">
<ul>
<li><a href="">Home</a></li>
<li>Test</li>
<li>Test 2</li>
<li>Contact</li>
</ul>
</div>
</div>
<div class="row">
<div class="dummy"> </div>
<div class="main">
lots of textlots of textlots of textlots of textlots of textlots of textlots of textlots of text
...
lots of textlots of textlots of textlots of textlots of textlots of textlots of textlots of text
</div>
<div class="sidebar">
Some links here</br>
<br>Some links here</br>
<br>Some links here</br>
<br>Some links here</br>
<br>Some links here</br>
</div>
</div>
</body>
</html>
my.css:
div.row
{
width: 996px;
margin-left: auto;
margin-right: auto;
}
div.dummy {
float: left;
padding-right: 148px;
}
div.sidebar {
float: left;
padding-left: 32px;
}
div.main
{
width: 6.5in;
float: left;
}
.menu { padding-bottom: 60px; }
.menu ul { margin:0px auto; }
.menu li {
width: 22%;
text-align:center;
display:block;
float:left;
}
.menu a { display:block; }