Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4614526
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:42:44+00:00 2026-05-22T01:42:44+00:00

Is there any way to specify different font sizes for fallback fonts in CSS?

  • 0

Is there any way to specify different font sizes for fallback fonts in CSS? I want to do something like this (which obviously does not work):

div {
    font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
    font-size: 20px, 18px, 18px, 18px;
}

The idea being that Arial Narrow would display at 20px if the user has it installed; if not, the browser would fall back to Arial at 18px, then Helvetica at 18px, etc.

Or, could I use JS to achieve a similar effect?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:42:45+00:00Added an answer on May 22, 2026 at 1:42 am

    I understand what you want, but I think the answer to your question is “No, this can’t be done in CSS”, at least not in CSS2 afaik.

    Hoping someone can prove me wrong, ’cause i want this too 😀

    I suppose JS can accomplish this, at least up to some point. Not sure if there is a “is this font installed?” method in JS, but you may be able to make some educated guesses based on OS and such. Got no experience there sorry.

    Edit: some quick googling does provide a few clever JS tricks, though I haven’t tried them yet. E.g.
    http://remysharp.com/2008/07/08/how-to-detect-if-a-font-is-installed-only-using-javascript/

    Another edit, after some more searching:
    I was triggered by the “someone should propose it” :D. It seems CSS3 spec has the “font-size-adjust”, which may be of use here. However, support in browsers other than Firefox may not be optimal at the time I write this. Here’s the W3 word on that property:
    http://www.w3.org/TR/WD-font/#font-size-adjust

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to find out what seed Python used to seed its
I have created a module with several different controllers and therefore different pages. I
I'm using the Expression Encoder 3 SDK and I'm trying to specify the output
I am developing an application which is web-based (asp.net MVC). The user configures reminders
I am storing object values in strings e.g., string[] values = new string[] {
I'm trying to update a column's value in a bunch of rows in a
Short Vesion: I have to display a hierarchy ( TreeView ) of items of
I'm using the NPOI Library to import some data from an excel sheet to
I have a base class, SpecialClass . Lots of other classes inherit from it,
I've recently added a couple of fields to some tables in my database (SQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.