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

  • SEARCH
  • Home
  • 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 8957307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:57:36+00:00 2026-06-15T14:57:36+00:00

I’m having some issues in understanding the CSS numeric attributes in percents. In this

  • 0

I’m having some issues in understanding the CSS numeric attributes in percents.

In this special case, in order that my page is always properly displaid, I thought the best way is to always define numeric attributes in %, like width, height or font-size.

Now what suprises me are following points:

At resolution 1920×1080 and browser in fullscreen mode, zooming in and out affects only the font-size. Why? I thought that the percentual value always refers to the value of the parent node, and since I start from

html{
    width:100%;
    height:100%;
}

the font-size should also be static when zooming, since the size of the html resp. the body doesn’t change.

At resolution 800×600 and the browser in fullscreen mode, obviously the content gets scaled, because the html resp. the body itself is less higher, but the font-size is way too big. Let me show you this comparison:

enter image description here

Now obviously, this makes me think that the percentual value in font-size doesn’t refer to the height of the parent node. So the essential question is: if I want to achieve that a page’s elements and fonts are displayd well on let’s say a usual notebook and a netbook with lower resolution, how should I handle the values? Plus that the behaviour of the page is lovely also when the user zooms?

Addendum: I don’t pasted any code because it seems a general question to me.

  • 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-06-15T14:57:37+00:00Added an answer on June 15, 2026 at 2:57 pm

    You can define text sizes using the small, large, x-small, x-large etc. group of values instead of defining them directly in px. which will give you a more “relative” result.

    Another option, the one which I tend to use, is pt. 1pt in CSS is the equivalent 1/72 of an inch. How an inch is defined for a given screen is another matter, but browsers on devices like telephones where this could become an issue tend to work these things out.

    One final point to keep in mind is that a CSS pixel is not the same as a screen pixel. It isn’t exactly simple:

    If the pixel density of the output device is very different from that
    of a typical computer display, the user agent should rescale pixel
    values. It is recommended that the reference pixel be the visual angle
    of one pixel on a device with a pixel density of 96dpi and a distance
    from the reader of an arm’s length.

    Not exactly scientific eh? Basically what this means is that you don’t really have to worry about things like retina displays which have huge pixel densities compared to normal computer screens. All this to say that pretty much all CSS measurements are relative in some way. Write your code to be robust and work in the majority of cases, but don’t be surprised when you run into the odd hiccup like you have.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have this code to decode numeric html entities to the UTF8 equivalent character.
I know there's a lot of other questions out there that deal with this
I need a function that will clean a strings' special characters. I do NOT
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
Basically, what I'm trying to create is a page of div tags, each has

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.