Reputation: 2645
I'm trying to fix my header to the top, so that if the user scrolls trough a list the search input field and the title bars stays on top of the screen. But at the moment the header scrolls up with the content in the body...
This is what i have:
<body ng-controller="SearchCtrl" class="animated fadeIn">
<div class="bar bar-header fixed bar-assertive" style="padding-bottom: 20px;">
<a href="index.html"class="button icon-left ion-chevron-left smaller button-clear button-white"></a>
<h1 class="title">Suche</h1>
</div>
<label class="item item-input has-header fixed" style="margin-top: 5px;">
<input type="text" placeholder="Solothurn durchsuchen..." name="text" ng-model="searchBox.storeName">
</label>
<br>
The fixed class is:
position: fixed;
Any help much appreciated!
Upvotes: 0
Views: 1052
Reputation: 2369
Just to test it add !important
to your css fixed class. One of your other classes may be overriding/cascading over it. If it fixes it then you need to do something in your style sheet to make the position: fixed
rule take precedence over the other position rule that is getting applied so you can then drop the !important
as it is cleaner and lighter if the CSS cascades correctly the first time.
Upvotes: 1