Archived topic
different font sizes for different screens
5 replies · Started by anabella on March 7, 2019
Hello! I want to set different font sizes for different screens, and I was able to do it for headings (through appearance > customize > typography), but I couldn´t find this option for paragraphs. Basically I want the font size for paragraphs to be 18px for desktop, 17px for tablets and 16px for mobile.
Thanks in advance
Hi there,
some CSS like this:
@media (max-width: 767px) {
/* CSS in here for mobile only */
body {
font-size: 16px;
}
}
@media (min-width: 768px) and (max-width: 1024px) {
/* CSS in here for tablet only */
body {
font-size: 17px;
}
}
Thanks David, it´s working great for mobiles, but for tablets I´m still getting 16px instead of 17px
I tweaked the code above down 1px on both :)
Thanks a lot David!! :) All good now
Awesome - glad to be of help