I couldn’t find the option of a transparent header bar in the ionic framework so i created my own.
The problem is, in the browser it looks to be working fine, however when i upload the app and view it using the “Ionic View” app the transparent bar doesn’t work - it just displays a white bar across the top.
CSS:
/* Transparent Header Bar */
.bar.bar-transparent {
background-color: rgba(255,255,255,0) !important;
border-bottom: none;
background-size: 100% 0px;
}
.bar.bar-transparent .button-clear.button-clear.light {
color: #ffffff;
}
HTML
<ion-header-bar align-title="center" class="bar-transparent">
<button class="icon ion-navicon-round button button-clear light pull-right"></button>
</ion-header-bar>
<ion-view view-title="Chats">
<ion-content class="no-header">
<!-- content here -->
</ion-content>
</ion-view>
Any help would be greatly appreciated.
Thanks
Sujan12
November 10, 2015, 3:27pm
2
I put chrome://inspect into the chrome browser and it said “No Devices Detected”
How do you add a device to here?
I have inspected it in browser using the dev tools and it shows ok in there, just not using the “Ionic View” app.
Cheers
Sujan12
November 10, 2015, 4:41pm
4
I don’t know if you can inspect on Ionic View app. Why not build your own app and try with that?
I put chrome://inspect into the chrome browser and it said “No Devices Detected” How do you add a device to here?
Use google for that. Basically: Activate developer mode in device, connect.
Hey, the bar-clear
class acts as a transparent header bar. See this issue for more on this:
1 Like
Thank you, spent ages on this too dam
I have tried the class bar-clear
again seems to be fine in Browser, but when i view it in ‘Ionic View’ app its not transparent, it just displays a white bar at the top.
Did you try the suggestion in that post? Here:
+1 for @brandyshea 's answer.
Use the bar-clear class for the nav bar. But you also have to add some styling to the ion-content directive otherwise you can get an empty white bar at the top.
<ion-view>
<ion-nav-bar class="bar-clear"
...
</ion-nav-bar>
<ion-content class="no-header" style="top: 0;">
...
</ion-content>
</ion-view>
Here I have added some inline css but its better to add it to your scss file
I have same problem no working on device