Jump to content
  • 0

3 колонки, шапка, подвал - контент вверху html (после шапки)


LeoStanlik
 Share

Question

Собственно обычный вариант, но важность представляет то, что поместить контент надо как можно выше к метам, сразу после шапки - SEO вариант. Макет должен быть резиновым по правому, левому блокам и контенту вниз и в боки.

Типо того:

<div id="header">
</div>

<div id="content">
<div>Контент</div>
</div>

<div id="leftblock">
</div>

<div id="rightblock">
</div>

<div class="clear"></div>
<div id="footer">
</div>

Рассмотрел кучу примеров, мое решение -

.mainbody #header {
width: 100%;
}
#content {
position: absolute;
top: auto;
left: 20%;
width: 59%;
min-height: 40px;
margin-top: 10px;
margin-left: auto;
margin-right: auto;
padding: 0;
}
#leftblock {
float: left;
width: 18%;
min-height: 40px;
margin-left: 10px;
}
#rightblock {
float: right;
width: 18%;
min-height: 40px;
margin-right: 10px;
}
#footer {
width: 98%;
margin-top: 10px;
margin-left: auto;
margin-right: auto;
min-height: 20px;
}

Кто подскажет, как подвал отправить на место? Понятно, что в потоке он стоит ниже правого и левого блоков... а если контент (position: absolute) длиннее вниз данных блоков, то подвал прячетса под него.

Насколько гуглил - понял одно - однозначнно правильного решения нет, но может кто нибудь подскажет наиболее рациональное?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy