Ionic ion-navbar trasparent











up vote
1
down vote

favorite
1












I have to succeed in making ion-navbar transparent.
I tried to put transparent, but it does not work.



"devDependencies": {
"@ionic/app-scripts": "2.1.3",
"ionic": "3.20.0",
"typescript": "2.3.4",
"electron": "^1.6.5"
},


page.html



<ion-header>
<ion-navbar>
<ion-title>
{{show.title}}
</ion-title>

<ion-buttons end>
<button class="appbarButton" *ngIf="target == 'tv'" ion-button icon-only (click)="selectCurrentEpisode()">
<ion-icon name="skip-backward"></ion-icon>
</button>
<button class="appbarButton" *ngIf="target == 'tv'" ion-button icon-only (click)="selectNextEpisode()">
<ion-icon name="skip-forward"></ion-icon>
</button>
<button class="appbarButton" *ngIf="detail" ion-button icon-only (click)="changeFavorite()">
<ion-icon name="{{ (detail.favorite == true) ? 'star' : 'star-outline' }}"></ion-icon>
</button>
</ion-buttons>
</ion-navbar>
</ion-header>











share|improve this question






















  • yannbraga.com/2017/03/16/how-to-transparent-header-ionic2
    – WhitehorseJJ
    Nov 23 at 0:03










  • codepen.io/tvial/pen/mJojJo
    – WhitehorseJJ
    Nov 23 at 0:07















up vote
1
down vote

favorite
1












I have to succeed in making ion-navbar transparent.
I tried to put transparent, but it does not work.



"devDependencies": {
"@ionic/app-scripts": "2.1.3",
"ionic": "3.20.0",
"typescript": "2.3.4",
"electron": "^1.6.5"
},


page.html



<ion-header>
<ion-navbar>
<ion-title>
{{show.title}}
</ion-title>

<ion-buttons end>
<button class="appbarButton" *ngIf="target == 'tv'" ion-button icon-only (click)="selectCurrentEpisode()">
<ion-icon name="skip-backward"></ion-icon>
</button>
<button class="appbarButton" *ngIf="target == 'tv'" ion-button icon-only (click)="selectNextEpisode()">
<ion-icon name="skip-forward"></ion-icon>
</button>
<button class="appbarButton" *ngIf="detail" ion-button icon-only (click)="changeFavorite()">
<ion-icon name="{{ (detail.favorite == true) ? 'star' : 'star-outline' }}"></ion-icon>
</button>
</ion-buttons>
</ion-navbar>
</ion-header>











share|improve this question






















  • yannbraga.com/2017/03/16/how-to-transparent-header-ionic2
    – WhitehorseJJ
    Nov 23 at 0:03










  • codepen.io/tvial/pen/mJojJo
    – WhitehorseJJ
    Nov 23 at 0:07













up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I have to succeed in making ion-navbar transparent.
I tried to put transparent, but it does not work.



"devDependencies": {
"@ionic/app-scripts": "2.1.3",
"ionic": "3.20.0",
"typescript": "2.3.4",
"electron": "^1.6.5"
},


page.html



<ion-header>
<ion-navbar>
<ion-title>
{{show.title}}
</ion-title>

<ion-buttons end>
<button class="appbarButton" *ngIf="target == 'tv'" ion-button icon-only (click)="selectCurrentEpisode()">
<ion-icon name="skip-backward"></ion-icon>
</button>
<button class="appbarButton" *ngIf="target == 'tv'" ion-button icon-only (click)="selectNextEpisode()">
<ion-icon name="skip-forward"></ion-icon>
</button>
<button class="appbarButton" *ngIf="detail" ion-button icon-only (click)="changeFavorite()">
<ion-icon name="{{ (detail.favorite == true) ? 'star' : 'star-outline' }}"></ion-icon>
</button>
</ion-buttons>
</ion-navbar>
</ion-header>











share|improve this question













I have to succeed in making ion-navbar transparent.
I tried to put transparent, but it does not work.



"devDependencies": {
"@ionic/app-scripts": "2.1.3",
"ionic": "3.20.0",
"typescript": "2.3.4",
"electron": "^1.6.5"
},


page.html



<ion-header>
<ion-navbar>
<ion-title>
{{show.title}}
</ion-title>

<ion-buttons end>
<button class="appbarButton" *ngIf="target == 'tv'" ion-button icon-only (click)="selectCurrentEpisode()">
<ion-icon name="skip-backward"></ion-icon>
</button>
<button class="appbarButton" *ngIf="target == 'tv'" ion-button icon-only (click)="selectNextEpisode()">
<ion-icon name="skip-forward"></ion-icon>
</button>
<button class="appbarButton" *ngIf="detail" ion-button icon-only (click)="changeFavorite()">
<ion-icon name="{{ (detail.favorite == true) ? 'star' : 'star-outline' }}"></ion-icon>
</button>
</ion-buttons>
</ion-navbar>
</ion-header>








cordova ionic-framework ionic2 ionic3






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 22 at 16:06









Paul

241210




241210












  • yannbraga.com/2017/03/16/how-to-transparent-header-ionic2
    – WhitehorseJJ
    Nov 23 at 0:03










  • codepen.io/tvial/pen/mJojJo
    – WhitehorseJJ
    Nov 23 at 0:07


















  • yannbraga.com/2017/03/16/how-to-transparent-header-ionic2
    – WhitehorseJJ
    Nov 23 at 0:03










  • codepen.io/tvial/pen/mJojJo
    – WhitehorseJJ
    Nov 23 at 0:07
















yannbraga.com/2017/03/16/how-to-transparent-header-ionic2
– WhitehorseJJ
Nov 23 at 0:03




yannbraga.com/2017/03/16/how-to-transparent-header-ionic2
– WhitehorseJJ
Nov 23 at 0:03












codepen.io/tvial/pen/mJojJo
– WhitehorseJJ
Nov 23 at 0:07




codepen.io/tvial/pen/mJojJo
– WhitehorseJJ
Nov 23 at 0:07












3 Answers
3






active

oldest

votes

















up vote
1
down vote













Did you try to play with its opacity ? Try this :



HTML file :



<ion-navbar class="transparent-nav-bar">
<ion-title>
{{show.title}}
</ion-title>
</ion-navbar>


SCSS file :



.transparent-nav-bar {
opacity: 0;
}





share|improve this answer





















  • I tried as you say, but I can not make the transparent bar. To see the image below.
    – Paul
    Nov 22 at 16:38










  • I just tried and it works fine. Try to inspect your element and be sure the CSS is not overrided by something else. Also make sure your selector is precise enough (maybe you should try with ion-navbar.transparent-nav-bar).
    – rguerin
    Nov 22 at 16:58












  • I do not understand it's not working, how do I do the inspection? I'm using it on a physical device, not on a browser. Then the theming does not seem to support the rgba like this: "#0f000000".
    – Paul
    Nov 22 at 17:08












  • Then it is better to put it on ion-header or ion-navbar, see code above.
    – Paul
    Nov 22 at 17:10


















up vote
1
down vote













Try adding a custom color in your src/theme/variables.scss file by adding a property in the $colors map and then call it like this.



<ion-navbar color="custom">





share|improve this answer





















  • I'm trying directly in the app / app.scss, but it does not seem to work.
    – Paul
    Nov 22 at 16:48










  • Then it does not have to be a color must be seen, image below.
    – Paul
    Nov 22 at 16:48










  • ionicframework.com/docs//theming/theming-your-app ionicframework.com/docs/2.0.1/api/components/navbar/Navbar
    – itdoesntwork
    Nov 22 at 16:49


















up vote
1
down vote













If you are trying to find the right class try this:



.toolbar-background.toolbar-background-md{
background-color: transparent;
}





share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53434707%2fionic-ion-navbar-trasparent%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    Did you try to play with its opacity ? Try this :



    HTML file :



    <ion-navbar class="transparent-nav-bar">
    <ion-title>
    {{show.title}}
    </ion-title>
    </ion-navbar>


    SCSS file :



    .transparent-nav-bar {
    opacity: 0;
    }





    share|improve this answer





















    • I tried as you say, but I can not make the transparent bar. To see the image below.
      – Paul
      Nov 22 at 16:38










    • I just tried and it works fine. Try to inspect your element and be sure the CSS is not overrided by something else. Also make sure your selector is precise enough (maybe you should try with ion-navbar.transparent-nav-bar).
      – rguerin
      Nov 22 at 16:58












    • I do not understand it's not working, how do I do the inspection? I'm using it on a physical device, not on a browser. Then the theming does not seem to support the rgba like this: "#0f000000".
      – Paul
      Nov 22 at 17:08












    • Then it is better to put it on ion-header or ion-navbar, see code above.
      – Paul
      Nov 22 at 17:10















    up vote
    1
    down vote













    Did you try to play with its opacity ? Try this :



    HTML file :



    <ion-navbar class="transparent-nav-bar">
    <ion-title>
    {{show.title}}
    </ion-title>
    </ion-navbar>


    SCSS file :



    .transparent-nav-bar {
    opacity: 0;
    }





    share|improve this answer





















    • I tried as you say, but I can not make the transparent bar. To see the image below.
      – Paul
      Nov 22 at 16:38










    • I just tried and it works fine. Try to inspect your element and be sure the CSS is not overrided by something else. Also make sure your selector is precise enough (maybe you should try with ion-navbar.transparent-nav-bar).
      – rguerin
      Nov 22 at 16:58












    • I do not understand it's not working, how do I do the inspection? I'm using it on a physical device, not on a browser. Then the theming does not seem to support the rgba like this: "#0f000000".
      – Paul
      Nov 22 at 17:08












    • Then it is better to put it on ion-header or ion-navbar, see code above.
      – Paul
      Nov 22 at 17:10













    up vote
    1
    down vote










    up vote
    1
    down vote









    Did you try to play with its opacity ? Try this :



    HTML file :



    <ion-navbar class="transparent-nav-bar">
    <ion-title>
    {{show.title}}
    </ion-title>
    </ion-navbar>


    SCSS file :



    .transparent-nav-bar {
    opacity: 0;
    }





    share|improve this answer












    Did you try to play with its opacity ? Try this :



    HTML file :



    <ion-navbar class="transparent-nav-bar">
    <ion-title>
    {{show.title}}
    </ion-title>
    </ion-navbar>


    SCSS file :



    .transparent-nav-bar {
    opacity: 0;
    }






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 22 at 16:32









    rguerin

    48113




    48113












    • I tried as you say, but I can not make the transparent bar. To see the image below.
      – Paul
      Nov 22 at 16:38










    • I just tried and it works fine. Try to inspect your element and be sure the CSS is not overrided by something else. Also make sure your selector is precise enough (maybe you should try with ion-navbar.transparent-nav-bar).
      – rguerin
      Nov 22 at 16:58












    • I do not understand it's not working, how do I do the inspection? I'm using it on a physical device, not on a browser. Then the theming does not seem to support the rgba like this: "#0f000000".
      – Paul
      Nov 22 at 17:08












    • Then it is better to put it on ion-header or ion-navbar, see code above.
      – Paul
      Nov 22 at 17:10


















    • I tried as you say, but I can not make the transparent bar. To see the image below.
      – Paul
      Nov 22 at 16:38










    • I just tried and it works fine. Try to inspect your element and be sure the CSS is not overrided by something else. Also make sure your selector is precise enough (maybe you should try with ion-navbar.transparent-nav-bar).
      – rguerin
      Nov 22 at 16:58












    • I do not understand it's not working, how do I do the inspection? I'm using it on a physical device, not on a browser. Then the theming does not seem to support the rgba like this: "#0f000000".
      – Paul
      Nov 22 at 17:08












    • Then it is better to put it on ion-header or ion-navbar, see code above.
      – Paul
      Nov 22 at 17:10
















    I tried as you say, but I can not make the transparent bar. To see the image below.
    – Paul
    Nov 22 at 16:38




    I tried as you say, but I can not make the transparent bar. To see the image below.
    – Paul
    Nov 22 at 16:38












    I just tried and it works fine. Try to inspect your element and be sure the CSS is not overrided by something else. Also make sure your selector is precise enough (maybe you should try with ion-navbar.transparent-nav-bar).
    – rguerin
    Nov 22 at 16:58






    I just tried and it works fine. Try to inspect your element and be sure the CSS is not overrided by something else. Also make sure your selector is precise enough (maybe you should try with ion-navbar.transparent-nav-bar).
    – rguerin
    Nov 22 at 16:58














    I do not understand it's not working, how do I do the inspection? I'm using it on a physical device, not on a browser. Then the theming does not seem to support the rgba like this: "#0f000000".
    – Paul
    Nov 22 at 17:08






    I do not understand it's not working, how do I do the inspection? I'm using it on a physical device, not on a browser. Then the theming does not seem to support the rgba like this: "#0f000000".
    – Paul
    Nov 22 at 17:08














    Then it is better to put it on ion-header or ion-navbar, see code above.
    – Paul
    Nov 22 at 17:10




    Then it is better to put it on ion-header or ion-navbar, see code above.
    – Paul
    Nov 22 at 17:10












    up vote
    1
    down vote













    Try adding a custom color in your src/theme/variables.scss file by adding a property in the $colors map and then call it like this.



    <ion-navbar color="custom">





    share|improve this answer





















    • I'm trying directly in the app / app.scss, but it does not seem to work.
      – Paul
      Nov 22 at 16:48










    • Then it does not have to be a color must be seen, image below.
      – Paul
      Nov 22 at 16:48










    • ionicframework.com/docs//theming/theming-your-app ionicframework.com/docs/2.0.1/api/components/navbar/Navbar
      – itdoesntwork
      Nov 22 at 16:49















    up vote
    1
    down vote













    Try adding a custom color in your src/theme/variables.scss file by adding a property in the $colors map and then call it like this.



    <ion-navbar color="custom">





    share|improve this answer





















    • I'm trying directly in the app / app.scss, but it does not seem to work.
      – Paul
      Nov 22 at 16:48










    • Then it does not have to be a color must be seen, image below.
      – Paul
      Nov 22 at 16:48










    • ionicframework.com/docs//theming/theming-your-app ionicframework.com/docs/2.0.1/api/components/navbar/Navbar
      – itdoesntwork
      Nov 22 at 16:49













    up vote
    1
    down vote










    up vote
    1
    down vote









    Try adding a custom color in your src/theme/variables.scss file by adding a property in the $colors map and then call it like this.



    <ion-navbar color="custom">





    share|improve this answer












    Try adding a custom color in your src/theme/variables.scss file by adding a property in the $colors map and then call it like this.



    <ion-navbar color="custom">






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 22 at 16:45









    itdoesntwork

    712519




    712519












    • I'm trying directly in the app / app.scss, but it does not seem to work.
      – Paul
      Nov 22 at 16:48










    • Then it does not have to be a color must be seen, image below.
      – Paul
      Nov 22 at 16:48










    • ionicframework.com/docs//theming/theming-your-app ionicframework.com/docs/2.0.1/api/components/navbar/Navbar
      – itdoesntwork
      Nov 22 at 16:49


















    • I'm trying directly in the app / app.scss, but it does not seem to work.
      – Paul
      Nov 22 at 16:48










    • Then it does not have to be a color must be seen, image below.
      – Paul
      Nov 22 at 16:48










    • ionicframework.com/docs//theming/theming-your-app ionicframework.com/docs/2.0.1/api/components/navbar/Navbar
      – itdoesntwork
      Nov 22 at 16:49
















    I'm trying directly in the app / app.scss, but it does not seem to work.
    – Paul
    Nov 22 at 16:48




    I'm trying directly in the app / app.scss, but it does not seem to work.
    – Paul
    Nov 22 at 16:48












    Then it does not have to be a color must be seen, image below.
    – Paul
    Nov 22 at 16:48




    Then it does not have to be a color must be seen, image below.
    – Paul
    Nov 22 at 16:48












    ionicframework.com/docs//theming/theming-your-app ionicframework.com/docs/2.0.1/api/components/navbar/Navbar
    – itdoesntwork
    Nov 22 at 16:49




    ionicframework.com/docs//theming/theming-your-app ionicframework.com/docs/2.0.1/api/components/navbar/Navbar
    – itdoesntwork
    Nov 22 at 16:49










    up vote
    1
    down vote













    If you are trying to find the right class try this:



    .toolbar-background.toolbar-background-md{
    background-color: transparent;
    }





    share|improve this answer

























      up vote
      1
      down vote













      If you are trying to find the right class try this:



      .toolbar-background.toolbar-background-md{
      background-color: transparent;
      }





      share|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        If you are trying to find the right class try this:



        .toolbar-background.toolbar-background-md{
        background-color: transparent;
        }





        share|improve this answer












        If you are trying to find the right class try this:



        .toolbar-background.toolbar-background-md{
        background-color: transparent;
        }






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 22 at 20:24









        Rodrigo Baute

        965




        965






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53434707%2fionic-ion-navbar-trasparent%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            What visual should I use to simply compare current year value vs last year in Power BI desktop

            Alexandru Averescu

            Trompette piccolo