0

I am not able to give background color to buttons below.please help
enter image description here

2

3 Answers 3

2

You haven't closed the quotes in the ui:inputText field. Also, there's spelling mistake in the ui:inputText

Component:

<ui:inputText label="enter name"/> 
<div>  
    <ui:button label="PROGRAMS" class="customButton" /> 
    <ui:button label="Learning" class="customButton" /> 
    <ui:button label="Training" class="customButton" /> 
    <ui:button label="Contacts" class="customButton" /> 
    <ui:button label="SUPPORT" class="customButton" /> 
</div>

Style:

.THIS .customButton{
   background-color: #2574a9;
   color: #fff; 
}

Result: Result

You may modify the styling as per your requirement.

0

In Your case:

a) If ui:button contains NO class

.THIS .uiButton{ background-color:blue; }

b) If ui:button contains class

.THIS .uiButton.classname{ background-color:blue; }

0
<ui:button label="PROGRAMS" class="customButton" /> 

.THIS .customButton{ background-color: #2574a9 !important; color: #fff; }

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .