Semantic UI footer at the end

Jose Osorio picture Jose Osorio · Aug 22, 2015 · Viewed 32.5k times · Source

I'm using Semantic-UI in my project. I created an index page, everything works ok with the elements (navbar, footer, etc).

Now Im dev a signup page but footer does not goes to the end of the page, what can I do ?

Footer code:

<div class="ui inverted vertical footer segment">
    <div class="ui container">
        Travel Match 2015. All Rights Reserved
    </div>
</div>

NOTE: I do not have any css rules(yet) in the footer, only the ones added by semantic-ui

UPDATE: navbar code:

<div class="ui inverted segment">
    <div class="ui container">
        <div class="ui inverted secondary menu">
            <div class="item">
                <i class="plane icon app-icon"></i>
            </div>
                <div class="right item">
                  <a href="/signup">Signup</a>
                </div>
        </div>
    </div>
</div>

form code:

    <form class="ui large form container">
        <div class="ui stacked segment">
            <div class="field">
                <div class="ui left icon input">
                    <i class="user icon"></i>
                    <input type="text" name="email" placeholder="E-mail address">
                </div>
            </div>
            <div class="field">
                <div class="ui left icon input">
                    <i class="lock icon"></i>
                    <input type="password" name="password" placeholder="Password">
                </div>
            </div>
            <div class="ui fluid large teal submit button">Login</div>
        </div>
        <div class="ui error message"></div>
    </form>
    <div class="striped"></div>

Answer

m4n0 picture m4n0 · Aug 22, 2015

You can try absolute positioning since your content is smaller than the section in Semantic-ui docs.

Use min-height for applying the CSS rule as the footer is placed at the bottom at certain height range and thus avoiding any overlap over the content.

@media (min-height: 320px) {
  .ui.footer.form-page { /* Increased specificity for SO snippet priority */
    position: absolute;
    bottom: 0;
    width: 100%;
  }
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.8/semantic.min.css" rel="stylesheet" />
<div class="wrapper">
  <div class="ui inverted segment">
    <div class="ui container">
      <div class="ui inverted secondary menu">
        <div class="item">
          <i class="plane icon app-icon"></i>
        </div>
        <div class="right item">
          <a href="/signup">Signup</a>
        </div>
      </div>
    </div>
  </div>

  <form class="ui large form container">
    <div class="ui stacked segment">
      <div class="field">
        <div class="ui left icon input">
          <i class="user icon"></i>
          <input type="text" name="email" placeholder="E-mail address">
        </div>
      </div>
      <div class="field">
        <div class="ui left icon input">
          <i class="lock icon"></i>
          <input type="password" name="password" placeholder="Password">
        </div>
      </div>
      <div class="ui fluid large teal submit button">Login</div>
    </div>
    <div class="ui error message"></div>
  </form>
  <div class="striped"></div>
</div>
<div class="ui inverted vertical footer segment form-page">
  <div class="ui container">
    Travel Match 2015. All Rights Reserved
  </div>
</div>