Reputation: 4730
I'm am trying to implement a FAB on the bottom right corner of my web app. Is manual CSS the only way to do this? I do not see any documentation for this on https://material.angularjs.org.
This is an example of what I want to implement (the bottom right red button):
Upvotes: 11
Views: 18126
Reputation: 101
The main CSS rule is "right"; in order to add to Luis's answer, add this rule to the CSS:
.md-fab-bottom-right{
position: fixed !important;
right: 15px; /* Add this and change value to set the margin you want */
}
Upvotes: 10
Reputation: 1598
To improve your question: if you have problems with the button's position add this to your css:
.md-fab-bottom-right{
position: fixed !important;
}
This way, the button will be fixed even if the user do scroll
Upvotes: 2
Reputation: 4730
I just found out the answer:
<md-button class="md-fab md-fab-bottom-right" aria-label="Add a category">
<md-icon>add</md-icon>
</md-button>
I had to add a classname of md-fab-bottom-right
.
Upvotes: 14