0

Fitting

Can someone please teach me how to make my web code fit perfectly on other devices as it fits on my own

29th Oct 2024, 11:27 PM
Dan Addess
Dan Addess - avatar
4 ответов
+ 5
I'm guessing you are referring to the meta tag <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"> please don't use the tag system to highlight your code-bit.. and it appears you deleted that code 🤔 as well Dan Addess thanks Luo Shenshi
30th Oct 2024, 2:14 AM
BroFar
BroFar - avatar
+ 4
Dan Addess the keyword you should google is 'responsive web design' here is a good one https://www.w3schools.com/html/html_responsive.asp
30th Oct 2024, 2:45 AM
Bob_Li
Bob_Li - avatar
+ 3
The @media screen rule is a way to make your website look good on any device by adapting the style based on screen size. For example, you can use it to adjust the layout, font sizes, and other styles so that your website looks great on phones, tablets, or desktops. Like: body { font-size: 16px; } @media screen and (max-width: 768px) { body { font-size: 14px; } } In this example, the @media screen and (max-width: 768px) line checks if the screen width is 768 pixels or less, which is common for mobile screens. If it is, the styles inside this block are applied. This way, you can easily adjust things like font sizes, layouts, or images to make sure everything looks right on a smaller screen.
30th Oct 2024, 2:14 AM
Luo Shenshi
Luo Shenshi - avatar
+ 2
BroFar you're welcome sir
30th Oct 2024, 2:16 AM
Luo Shenshi
Luo Shenshi - avatar