Home > Blockchain >  How to make it responsive using css
How to make it responsive using css

Time:01-25

icon

Below code is my css and i'm trying to add an icon using another css but the icon css is not responsive how can i make it responsive.

.iconbox-singleD1 {
    background: rgba(160, 215, 231, 0.85);
    border-radius: 8px;
    padding: 25px 20px;
    margin-bottom: 30px;
    -webkit-border-radius: 8px;
    box-shadow: 0px 2px 20px rgba(74, 141, 245, 0.2);
    -webkit-box-shadow: 0px 2px 20px rgba(74, 141, 245, 0.2);
    -ms-flex-pack: justify;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 24px;
}
.iconbox-singleD1.active:before{
    opacity:1;
}
.iconbox-singleD1:before{
    content: "";
    position: absolute;
    top: 100%;
    left: 21px;
    right: 21px;
    height: 6px;
    border-radius: 0 0 6px 6px;
    background: rgb(209 243 253 / 85%);
    /* opacity: 0;
    -webkit-transition: opacity .25s;
    -o-transition: opacity .25s; */
    transition: opacity .25s;
}
.iconbox-singleD1.iconbox-singl {
    background: #fff;
    margin-bottom: 30px;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
    display: flex;
    align-items: center;
    background: #FFFFFF;    
}

.iconbox-singleD1 .box-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iconbox-singleD1 p {
    margin: 0 0 5px 0;
    /* text-transform: uppercase; */
    font-weight: 400;
    font-size: 14px;
    /* color: #0d1f3c; */
    color: #fff;
}
.iconbox-singleN1 h5 {
    margin: 0;
    font-size: 30px;
    font-weight: 500;
    color: #0d1f3c;
}

And this is the html skeleton. Here I'm using another css for icon div tag how can i combine with the above css to make it responsive.

<div >
          <div >
            <div >
              <div>
                <p>New Patients</p>
                <h5 >{{todaysAppointment}}</h5>
              </div>
              <div >
                <mat-icon>hotel</mat-icon>
              </div>
            </div>       
          </div>
        </div>

and this is the css i use in icon div tag

.padLeftIcon{
    position: absolute;
    left: 173px;
    width: 100%;
    height: 100%;
}

CodePudding user response:

You can use font-size in em e.g. font-size: 1.2em;

Working example link: https://jsfiddle.net/waqasahmad724/1ybxtp39/2/

  •  Tags:  
  • css
  • Related