Useful CSS Code Snippets

Revision as of 11:15, 13 February 2015 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Cascading Style Sheets (CSS) is a style sheet language used to change the style of web pages and user interfaces written in HTML and XHTML.

Resizing of Web Page Elements to Browser size

<div class="outer"></div>

with styles…

.outer {
    width: 100%;
    height: 100%;

CSS fails sometimes when considering browser height due to document vs. window heights. Some JavaScript can help.

<script>
  Webflow.push(function () {
    var fulls = $('.full-page');
    var win = $(window);
    Webflow.resize.on(function () {
      fulls.height(win.height());
    });
  });
</script>

For more information: Webflow - How to make hero section always fill browser window

Last modified on 13 February 2015, at 11:15