1. <code id="j2k2p"></code>
      <u id="j2k2p"></u>
    2. <\/code> :<\/p>
       html, body {\n  height: 100%;\n  margin: 0; \/* Remove default margin *\/\n}\n\n.container {\n  height: 100%;\n}<\/pre>
       
      Full height using 100%<\/div><\/pre>
      • height: 100%<\/code> means \"100% of the parent's computed height\".<\/li>
      • If html<\/code> and body<\/code> don't have a defined height, 100%<\/code> has no reference and won't work.<\/li><\/ul>

        ?? Common mistake: Forgetting to set html, body { height: 100%; }<\/code> <\/p>\"css<\/blockquote>


        ? When to use which?<\/h3>
        <thead id="zntam"></thead>
        Method<\/th> Best For<\/th> Notes<\/th><\/tr><\/thead>
        100vh<\/code><\/td> Full-screen sections, landing pages<\/td> Simple, no parent setup<\/td><\/tr>
        height: 100%<\/code><\/td> Layouts inside a defined container<\/td> Needs parent height chain<\/td><\/tr><\/tbody><\/table>

        ?? Gotchas with 100vh<\/code><\/h3>

        <em id="zntam"></em>

          <table id="zntam"></table>