html - How do people have long segmented web pages? -
i apologise in advance if obvious , noobish question, how segment web page multiple portions, each portion of webpage filling screen in it's entirety?
a example of wish similar treehouse's homepage when segment webpage multiple portions e.g "home","about us", etc.. i've tried right clicking on webpage , having through css did not see height and/or width applied on page.
how treehouse, , others segment webpages?do make use of background image or there other method of doing so?
when give html, body elements css property's:
html, body { height: 100%; width: 100%; }
and in html makke couple of div's this:
<div class="fitscreen"> content 1 </div> <div class="fitscreen" style="background-color: red"> content 2 </div> <div class="fitscreen" style="background-color: blue"> content 3 </div> <div class="fitscreen" style="background-color: yellow"> content 4 </div>
and give them css property of height: 100%;
fill whole screen.
edit:
or if want 1 element fills screen, , beneath element has height of auto, just give make 1 div
class of fitscreen
.
and beneath element own content.
Comments
Post a Comment