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


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


<ui:inputText label="enter name"/> 
    <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" /> 


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

Result: Result

You may modify the styling as per your requirement.

| improve this answer | |

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; }

| improve this answer | |
<ui:button label="PROGRAMS" class="customButton" /> 

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.