on 01-22-2016 9:27 AM
Hi All
I wanted rectangular button in my application.
for that I have written following code in my custom css file,but still it is not working
.button{
font-size:12px;
color: white;
background-color: brown;
border-radius: 25px;
}
only font color and font-size is getting applied to button but background color and border-radius is not getting applied
Hi Mack,
If the property you want to change is defined in the original css class, you have to use !important so the app will use your value, from your class.
eg: border-radius: 25px !important;
Regards,
Bogdan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Mack,
To be honest with you I am on 1.6 version and i debugged a normal button and I see another class which have the properties for the button : .sapMBtnInner
So I can't really tell you why the border-color doesn't change. Try debug with "inspect element" in Firefox and check which is actually the class responsible for the background color.
Regards,
Bogdan
Hi Mack,
.button.sapUiBtnS.sapUiBtnNorm.sapUiBtnStd
{
// proprties of button as u defined
}
the css classes ".sapUiBtnS.sapUiBtnNorm.sapUiBtnStd" along with the button class makes your css code work.
Thanks,
Sree Sailesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sree,
It is working now..........but background color is not getting applied.
I have written following code :
.button1.sapUiBtnS.sapUiBtnNorm.sapUiBtnStd
{
font-size:15px;
font-style:bold !important;
color: red !important;
background-color: green !important;
border-radius: 18px;
}
Please let me know where I am wrong.......
Hey Mack,
I tried the code you mentioned and it was working fine. Just try to add this code
.button1.sapUiBtnS.sapUiBtnNorm.sapUiBtnStd
{
background-image:none !important;
font-size:15px;
font-style:bold !important;
color: red !important;
background-color: green !important;
border-radius: 18px;
}
removing background image may clear your problem.
Thanks,
Sree Sailesh
Are you applying this CSS class to a Button component or to a Text component?
/Xavier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.