html - Can't set a margin with AngularJS (JavaScript) -
my name fernando , first topic in stack overflow. looking code error , didn't anything.
i created application angularjs routing in added container show in example , have added span , button. in span , button added margin, element not obeying code.
div.mainheader { width: 100%; height: 25%; background-image: no-repeat; background-size: 100%; } div.mainheader span { float: left; margin-left: 10px; margin-bottom: 10px; font-size: 18px; color: white; } div.mainheader .md-fab { float: right; margin-right: 10px; margin-bottom: 10px; }
<div class="mainheader" ng-controller="linkcontroller" ng-style="{'background-image': 'url({{ linkheader + 'international.png' }})'}"> <span>international</span> <md-button class="md-fab md-mini md-primary" aria-label="favorite"> <md-icon class="material-icons">notifications_none</md-icon> </md-button> </div>
// fernando pérez lara (fernando.perez.lara@outlook.com)
your question quite vague, think referring fact button not obey margin-bottom property?
this because there nothing below element margin 'push' against, margin extends empty space.
if so, try using css properties:
{ float: right; margin-right: 10px; position:relative; bottom:10px; }
position:relative powerful css property allows elements moved freely whist retaining original footprint on page.
Comments
Post a Comment