How to scale CSS background to desired dimensions

One can easily scale background in CSS to any dimension to fit its container. 100% CSS background is good looking and gives bump to your design. Here is how this can be done.

#MyID {
    background-size: 70% 60%; /* 70% width and 60% height  */
}

Since this is CSS3 property, supports all browsers after year 2012.

Recently Published

»

Which One is Better? DigitalOcean Or AWS?

Digitalocean or AWS: Picking a cloud service for your application or ...

»

Killing way to select Domain Name and Hosting

Planning to launch your online presence? We know it’s all very ...

»

7+ blogs to inspire how they made more than $200 in a day

On this page I want to go through the blogs on how they earn money ...

»

5 Best Practices to Make Responsive Web Design in 2020

According to statistics, 40.1% of the time spent on websites came ...

»

7 sites to download free stock videos for TikTok or YouTube

Many of us always wandering for free stock videos to integrate into ...

»

Website Uniqueness: How it affects your blog success?

Recently, more and more people use website builders ‘cause it is ...

»

8 Must-Know Things to Consider Before Starting Online Store

Are you planning to step into making a new online store or want to ...

»

4 flawless WordPress Plugins for Employee Management

Keeping your employee management in check is an important part of ...

»

Kubernetes: Why Today’s Programmers Need to Understand

Launched by three Google engineers, Kubernetes is a container ...