You need to sign in to do that
Don't have an account?
Manu@dev
Changing the background and text color of the apex command button
Hi,
I have written a style class as follows
.myButton {
color: white;
background: #006DCC;
border-left: 0px;
border-top: 0px;
border-bottom: 0px;
border-right: 0px;
width: 60px;
height: 22px;
}
The above class is for the following button -
<apex:commandButton value="Show Features" styleClass="myButton" />
But the button formatted with color and background. All remaining properties applied to button. When I do inspect element, I am seeing that color and background properties were striked out.
Can someone help me in chnaging the text color and background color of the button.
Thanks,
Manu
I have written a style class as follows
.myButton {
color: white;
background: #006DCC;
border-left: 0px;
border-top: 0px;
border-bottom: 0px;
border-right: 0px;
width: 60px;
height: 22px;
}
The above class is for the following button -
<apex:commandButton value="Show Features" styleClass="myButton" />
But the button formatted with color and background. All remaining properties applied to button. When I do inspect element, I am seeing that color and background properties were striked out.
Can someone help me in chnaging the text color and background color of the button.
Thanks,
Manu
Please try putting myButton style class between the style tag, something like this:
<style type="text/css">
.myButton {
color: white;
background: #006DCC;
border-left: 0px;
border-top: 0px;
border-bottom: 0px;
border-right: 0px;
width: 60px;
height: 22px;
}
</style>
<div class="myclass"><apex:commandButton value="Show Features"/></div>
<div class="btn-primary1"><apex:commandButton value="Show Features" action="{!displayFeatures}"/></div>
...but still the text color of "Show Features" is not changing. I think there is some problem with those CSS attributes which I have used?
R - Manu
R - Manu