How to make background image fit in all resolutions. | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

How to make background image fit in all resolutions.

https://code.sololearn.com/W458cqcjgstX/#html (sorry for english) i this code i gave background img certain height but the problem is if i open on my pc it will not show complete img while on phone it does how can i make it to fit all resolution wheater you use mobile or pc .(iam not good at designing so there might be other common mistakes) .

28th Jul 2020, 8:14 AM
Abdul Majeed Faraz
Abdul Majeed Faraz - avatar
3 ответов
+ 4
Use background-size:100% 100%; As cover means aspect ratio
28th Jul 2020, 8:23 AM
v@msi😉
v@msi😉 - avatar
+ 2
Use this: <meta name="viewport" content="width=device-width, initial-scale=1.0">
28th Jul 2020, 11:10 AM
Ben Joseph
Ben Joseph - avatar
+ 2
thanks
28th Jul 2020, 11:45 AM
Abdul Majeed Faraz
Abdul Majeed Faraz - avatar