+ 1

How to create a website suitable for phone screen ?

I have created a website.It is working properly in laptop but when it comes to phone doesn't fit to phone screen.

14th Aug 2020, 4:10 PM
PRASANNA POOLA
PRASANNA POOLA - avatar
6 ответов
+ 3
You have to specify inside of css that what styles should change if the viewport gets to a specific point, such as, .navbar { padding:10px; } @media (max-width: 380px) { .navbar { padding: 0; } } So the padding would decrease to 0 when window gets smaller. Use your console in the browser dev tools to adjust the width of viewport, and to check the width where things start to get messy, and add a media query for that.
14th Aug 2020, 4:57 PM
maf
maf - avatar
+ 1
Read about meta tag view port.. May help you.. Edit: https://www.w3schools.com/css/css_rwd_viewport.asp#:~:text=The%20viewport%20is%20the%20user's,design%20and%20a%20fixed%20size.
14th Aug 2020, 4:17 PM
Jayakrishna 🇮🇳
+ 1
Thank you
14th Aug 2020, 4:52 PM
PRASANNA POOLA
PRASANNA POOLA - avatar
+ 1
Use mediaquery for responsive web design. Or Relative unit(%,rem) based elements to get multiple screen friendly web page
14th Aug 2020, 5:18 PM
Divya Mohan
Divya Mohan - avatar
+ 1
I think u use the bootstrap which solve ur problems....
15th Aug 2020, 1:06 PM
Tushar
Tushar - avatar
+ 1
U must use media queries. U can write them inside head tag. for example: <link rel="stylesheet" href="mobile-style.css" media="screen"> Hope my answer can be useful. HAPPY CODING WITH JS 😊 { }
16th Aug 2020, 1:02 PM
Bob
Bob - avatar