Shurvir Mori Shurvir Mori - 5 months ago 10
CSS Question

How to call multiple classes of CSS in a single class?

I have made one button:

<input type="button" class="btn-custom btn btn-info" />


CSS Code

.btn-info {
background-color: #6fb3e0!important;
border-color: #6fb3e0;
}
.btn{padding:5px 10px}
.btn-custom{height:20px;}


I want to combine the style of
btn-custom
and
btn btn-info
in single class called
.btnCustom
.

In short I want the same result as when I try this:

<input type="button" class="btnCustom" />

Answer

You can use Css like this,

.btnCustom, .btn-info {
   background-color: #6fb3e0!important;
   border-color: #6fb3e0;
}
 .btnCustom ,.btn{
   padding:5px 10px;
 }
 .btnCustom ,.btn-custom{
   height:20px;
 }

and Html

<input type="button" class="btn-custom btn btn-info" />

Its work in My Website.

Comments