1
Good afternoon, I’m trying to put css in Ionic, some things worked and others didn’t. I studied a little css with this booklet, I tried applying background colors to ion-list
of menu.html
, but it didn’t work, the only thing I was able to change, for now, was the source.
html menu.
<ion-side-menus enable-menu-with-back-views="false">
<ion-side-menu-content>
<ion-nav-bar class="bar-assertive">
<ion-nav-back-button class="no-text"></ion-nav-back-button>
<ion-nav-buttons side="left"><button class="button button-icon button-clear ion-navicon" menu-toggle="left"></button></ion-nav-buttons>
</ion-nav-bar>
<ion-nav-view name="menuContent"></ion-nav-view>
</ion-side-menu-content>
<ion-side-menu side="left">
<ion-header-bar class="bar-assertive"><h1 class="title">Santa Filomena</h1></ion-header-bar>
<ion-content class="teste">
<div>
<img class="full-image" src="img/santa-filomena3.jpg" class="avatar motion spin fade">
<p>Santuário Santa Filomena - Sorocaba/Sp</p>
</div>
<ion-list class="list-custom">
<ion-item menu-close href="#/app/principal">principal </ion-item>
<ion-item menu-close href="#/app/missa">Missa</ion-item>
<ion-item menu-close href="#/app/adoracao">Adoração</ion-item>
<ion-item menu-close href="#/app/doacao">Doação</ion-item>
<ion-item menu-close href="#/app/confissao">Confissao</ion-item>
<ion-item menu-close href="#/app/santaFilomena">Santa Filomena</ion-item>
<ion-item menu-close href="#/app/avisos">Avisos</ion-item>
<ion-item menu-close href="#/app/eventosFestas">Eventos e festas</ion-item>
<ion-item menu-close href="#/app/secretaria">Secretaria</ion-item>
<ion-item menu-close href="#/app/playlists">Em Desenvolvimento</ion-item>
</ion-list>
</ion-content>
</ion-side-menu>
</ion-side-menus>
css style.
body {
background-color: #FF8C69;
}
.menu.menu-left {
font-weight: bold;
}
.menu.content-teste {
background-color: #F0FFFF;
}
.list-custom .item {
background-color: #FF8C69;
}
Could anyone help me how I can change the background of the ion-list component ?
– Lucas Santos
Try to change the color of
.item
and.item a
, example:.menu .list .item a,.menu .list .item {background-color:red}
.– abfurlan
I tried to put the following : . list-custom . item{ background-color: #000000; color: Orange; } so I was able to change the color of the words inside the ion-item, but the background color didn’t work. @abfurlan
– Lucas Santos
@abfurlan what do you suggest? it seems as if I could not override the color of that component.
– Lucas Santos
Try putting the background color on the element for example: . list-custom . item a { background-color:...
– abfurlan
Your CSS is being loaded after Ionic CSS?
– abfurlan
thank you so much for helping @abfurlan, I put the letter a in all my ion-item and I now run the background color. no css -> . list-custom . item a{ background-color: #000000; color: Orange; }
– Lucas Santos
example of how I put in the ion-list -> <ion-item menu-close href="#/app/secretary" a> Secretariat </ion-item> I put that in all and it put background color , thank you very much for the tips. @abfurlan
– Lucas Santos
I posted as an answer :)
– abfurlan