El Responsive
Responsiveness In A Single Line
Key Points ๐ฅ:-
โถ๏ธ !important must be โ prohibited in your line of code.
โถ๏ธ Practice of using rem instead of px in CSS Files. โ
โถ๏ธ The given Technique will almost make everything your website responsive especially the texts.
Things To Do ๐ง :-
๐ First you should replace all the px attributes with rem.
๐ You must have in your mind that 1rem = 16px ๐ช.
๐ In the html portion of the CSS File put style โfont-size: 10pxโ.
๐ If we write โfont-size: 100%โ , this implies 16px.
๐ So from the above figure we can conclude that in the html we can apply โfont-size: 62.5%โ which is 10px and makes 1rem = 10px. By doing so, you have to check all the decimals part of the font size wherever you did wrote the style. For eg. โfont-size: 22pxโ, then the px converts into rem i.e., โfont-size: 22remโ, then by checking the decimal we conclude the font size as 2.2rem. It will work though. ITS FOR NORMAL WINDOW SIZE.
๐ NOW IN 998PX DEVICES, FONT-SIZE: 55% = 8.8PX
๐ NOW IN 768PX DEVICES, FONT-SIZE: 45% = 7.2PX
๐ By doing the above, you can make your website fully responsive.
THANK YOU