Different font sizes in different browsers?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Different font sizes in different browsers??

When I was making my blog..I saw an example here in SoloLearn but when I entered that font-size, it was too small for my Android Firefox..So I increased the font-size to fit it in the Firefox browser...But when I opened the html in UC, it was quite big but ok..And on Chrome, it was the same size as Firefox...I finished my blog and was about to publish here..But when I saw the output, it just fully covered the screen, it has become a mess, now should I change the font-size everytime for different browsers??

12th Mar 2018, 11:47 PM
Aslam Mohd
Aslam Mohd - avatar
9 Answers
+ 3
the "viewport" meta tag can define the grid size that the transformations working on, it will automatically set all sizes to a proper value to fit in the screen size on any device, here how to use it: put it in the "head" tag: <head> <meta name="viewport" content="width=device-width"> </head> so, stuff will fit perfectly on any device, and you don't need to change font size for each device, good luck.
13th Mar 2018, 12:22 AM
ƒred
ƒred - avatar
+ 5
I don't know what you are doing, but your browser knows, to verify if you have an error, check the "console" of your browser, you will be noticed that your file doesn't exist"404 error". An other way to make your css working by using the <style> tag in your html document. An example: <style> body { background-color: #000000; } </style>
13th Mar 2018, 1:26 AM
ƒred
ƒred - avatar
+ 5
Good luck bro :)
13th Mar 2018, 9:54 PM
ƒred
ƒred - avatar
+ 4
I think you have some errors in the code at the link tag, check the code, also make sure that your .css file is exist in a folder called "styles" in your project folder, that will make your project regular and all browsers will work with your files correctly.
13th Mar 2018, 12:43 AM
ƒred
ƒred - avatar
+ 2
Okay..I got it..I fixed it...Thnx Fred
13th Mar 2018, 9:47 PM
Aslam Mohd
Aslam Mohd - avatar
+ 2
Actually it fixed automatically when i restarted my phone..
13th Mar 2018, 9:52 PM
Aslam Mohd
Aslam Mohd - avatar
+ 1
But when i used the meta viewport tag..My html file couldn't link to the local css file...why and how to fix it??
13th Mar 2018, 12:27 AM
Aslam Mohd
Aslam Mohd - avatar
+ 1
Code and location is all correct...I am able to link my css very correctly but as I entered the viewport tag it gets disconnected with my css..i have checked my code many times its correct only....any other thing im doing wrong?
13th Mar 2018, 12:59 AM
Aslam Mohd
Aslam Mohd - avatar
+ 1
ty bro..
13th Mar 2018, 9:54 PM
Aslam Mohd
Aslam Mohd - avatar