I'm using angular material on a rails app, want a toolbar to sit on top of an image and make that toolbar clear so you can see the image behind it. Here is the code so far:
<div layout="column" layout-fill>
<div layout="row">
<img src="http://www.outsideonline.com/sites/default/files/styles/full-page/public/yosemite-smart-black-bear_h.jpg?itok=kKS8ILd9">
<md-toolbar id="toolbar" class="transparent">
<div class="md-toolbar-tools">
<span>Turbo Mortgages</span>
<!-- fill up the space between left and right area -->
<span flex></span>
<md-button ui-sref="app.register"
aria-label="Toggle Mobile Navigation">
About
</md-button>
<md-button ui-sref="app.join"
aria-label="Toggle Mobile Navigation">
Join
</md-button>
<md-button ui-sref="app.login"
aria-label="Toggle Mobile Navigation">
Login
</md-button>
</div>
</md-toolbar>
</div>
<md-content>
<ng-view></ng-view>
</md-content>
and what I see on the page right now is just the image...here is the css:
#toolbar {
position:relative;
z-index:1000;
}
how do i get the toolbar to lay on top of the image if not with z-index? thanks for help!
The color of a <mat-toolbar> can be changed by using the color property. By default, toolbars use a neutral background color based on the current theme (light or dark). This can be changed to 'primary' , 'accent' , or 'warn' .
The <mat-toolbar> is an Angular Directive used to create a toolbar to show the title, header, or any button action of buttons.
The height of the toolbar can be changed by adding the classes to the md-toolbar . Save this answer. Show activity on this post.
I ended up making the image the background of the toolbar...You could also set the
position: absolute
background-color:transparent
on the toolbar to place it over the image
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