gausmohammad
gausmohammad

Reputation: 55

Why css not working on ion-header, ion-toolbar and ion-icon?

I'm create Ionic 4 angular app, and used css styles on ion-header, ion-toolbar and ion-icon. but css not work as expected ?

Here is my stackblitz code

Upvotes: 1

Views: 1016

Answers (2)

Divesh Panwar
Divesh Panwar

Reputation: 141

ts file

you have not include styleUrls, thus styles are not being applied

please add:

styleUrls: ['/home.css']

your config will look like:

@Component({
  selector: 'page-home',
  templateUrl: 'home.html',
  styleUrls: ['home.css']
})

Upvotes: 4

Ayyaz Khan
Ayyaz Khan

Reputation: 25

Use style url properly as styleUrls: ['/home.css'], Your are overriding the build in functionality of ionic and no link of that style file in template

Upvotes: 0

Related Questions