anywhere
Posts: 40
Joined: Tue Sep 08, 2020 3:04 am

Applying CSS

Hi
How do I apply CSS to a header? It is not obvious in your documentation. You have a section about styling but there nothing about CSS in it.
Thanks

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Re: Applying CSS

Hello,

Could you please clarify a few things:

  1. What project type do you use here? JQM, Ionic (1,4,5)

  2. What styles exactly do you want to apply? To the header itself or the label/buttons on it?

anywhere
Posts: 40
Joined: Tue Sep 08, 2020 3:04 am

Re: Applying CSS

It is Ionic 5. You do not have an IONIC 5 section in the forum so I posted in IONIC 4.

In the SCSS tab, I add the following code...
.cssheader {
background-color:#000000;
}
Then in the Class properties of the header I add cssheader.

No effect.
Thx

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Re: Applying CSS

Please use the following CSS for that:

Code: Select all

.cssheader ion-toolbar {
   --background:#000000;
}
anywhere
Posts: 40
Joined: Tue Sep 08, 2020 3:04 am

Re: Applying CSS

Great, thank you. That worked perfectly.
Please can you create a section for IONIC 5 on your forum as I think there will be many IONIC 5 issues during beta which will have no relevance to IONIC 4. This will be confusing to IONIC 4 users.
Thank you.

Return to “Issues”