0
Fitting
Can someone please teach me how to make my web code fit perfectly on other devices as it fits on my own
4 Antworten
+ 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
+ 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
+ 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.
+ 2
BroFar you're welcome sir