Does anyone know which of these is best practice?
A: Layout wrapper inside
main
B: Layout wrapper outside
main
I know it is bad practice to style HTML5 semantics hence why I have styled a div
element for wrapping the layout for the page content, but I am unsure what the best practice is regarding where to place the wrapper in regards to HTML5 semantics main
or if it even matters.
SEO is my main concern more than anything.
The wrapper is for content only, the footer
and header
are outside the wrapper.
CSS:
#wrapper {
box-sizing: border-box;
width: 1200px;
min-height: 100%;
height: auto;
padding: 100px 0 200px 0;
margin: 0 auto;
}
HTML A:
<main role="main">
<div id=wrapper></div>
</main>
HTML B:
<div id=wrapper>
<main role="main"></main>
</div>