I'm having some trouble adding a fixed button on the bottom of my webpage. Been testing out different numbers with the pixels, but the button hasn't been showing underneath the page on the right.
HTML
<a href="#head"><img src="upbutton.png" id="fixedbutton"></a>
CSS
.fixedbutton { position: fixed; bottom: 560px; right: 1000px; }
On the module, find the Fixed position toggle in Design > Button > General. Once toggled on, you can pin the button at either the bottom right, bottom left or bottom center of the screen.
You need to use position: absolute in order for it from the bottom-right. The parent component must have the relative tag and button should have an absolute tag.
You can also move you button to right by applying text-align: right; to it's parent. In your case it's parent is body. Note: It make your p tag also align to right.
Go to res (right-click) > New > Android resource file and in the pop-up menu choose the resource type to menu and name the file bottom_nav_menu. It should look like this. Inside bottom_nav_menu. xml add items that we want to show in the bottom app bar.
You are specifying .fixedbutton
in your CSS (a class) and specifying the id
on the element itself.
Change your CSS to the following, which will select the id
fixedbutton
#fixedbutton { position: fixed; bottom: 0px; right: 0px; }
Here's a jsFiddle courtesy of JoshC.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With