Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

md-app md-mode="fixed" not working #1297

Closed
filipefox opened this issue Dec 11, 2017 · 4 comments
Closed

md-app md-mode="fixed" not working #1297

filipefox opened this issue Dec 11, 2017 · 4 comments
Labels

Comments

@filipefox
Copy link

filipefox commented Dec 11, 2017

The md-mode="fixed" is not working if i want a full height page to be scrollable but keeping the toolbar fixed.

Someone have achieved this? Thanks!

<template>
  <div id="app" class="page-container">
    <md-app md-mode="fixed">
      <md-app-toolbar class="md-primary">
        <span class="md-title">My Title</span>
      </md-app-toolbar>
      <md-app-content>
        <router-view></router-view>
      </md-app-content>
    </md-app>
  </div>
</template>

<style lang="scss" scoped>

</style>

<script>
  export default {
    name: 'app'
  }
</script>
@VdustR
Copy link
Member

VdustR commented Dec 12, 2017

#1256

You could add class or style on it.

If you want it with a 100% viewport height, try:

<template>
  <md-app class="full-height" md-mode="fixed">
  </md-app>
</template>

<style lang="scss" scoped>
.full-height {
  height: 100vh;
}
</style>

@filipefox
Copy link
Author

filipefox commented Dec 12, 2017

@VdustR, I tried this before, seeing exactly the #1256, but the toolbar is scrolling, like in the image attached.

captura de tela 2017-12-12 as 10 10 08

@Samuell1
Copy link
Member

Remove root div that you have in your code.

@filipefox
Copy link
Author

filipefox commented Dec 12, 2017

@Samuell1, tried this right now and does not work BUT it worked now when i tried this below.
Thanks so much and nice work with this awesome project! : )

max-height: 100vh;

<template>
  <div id="app" class="page-container">
    <md-app md-mode="fixed">
      <md-app-toolbar class="md-primary">
        <span class="md-title">My Title</span>
      </md-app-toolbar>
      <md-app-content>
        <router-view></router-view>
      </md-app-content>
    </md-app>
  </div>
</template>

<script>
  export default {
    name: 'app'
  }
</script>

<style lang="scss" scoped>
  .md-app {
    max-height: 100vh;
  }
</style>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants