html - How to make "image banner" 100% of viewport with no margins, and rest of page center -
my question how banner 100%
of viewport whilst keeping else center.
right trying experiment skeleton framework use of pre made @media
solutions , grid system. noticed because 960 grid system can't put banner inside go 100%
of viewport ( restricted 960px
).
i solution allows me continue using skeleton framework , can work around 100%
viewport banner this site example.
if not possible need guidance best method of pulling off.
if understand question correctly, done wrapper within banner.
example:
html:
<div class="banner"> <div class="wrapper"> <h1>example title</h1> </div> </div>
css:
.banner { background: url(/* image */) center center no-repeat; background-size: cover; height: /* whatever height */; } .wrapper { margin: 0 auto; /* centers */ max-width: 1000px; width: 96%; }
so have individual wrappers within each section of content (header, main, footer, etc.).
to use skeleton (after brief @ documentation).
html:
<div class="banner"> <div class="container"><!-- 960 grid --> <div class="six columns><!-- or of 960 want take up--> <!-- content --> </div> </div> </div>
Comments
Post a Comment