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 6352297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:10:32+00:00 2026-05-24T22:10:32+00:00

When you are using YUI’s CSS scheme, font-sizes are based off of %’s instead

  • 0

When you are using YUI’s CSS scheme, font-sizes are based off of %’s instead of pixels because it gives a better overall consistent font-size across browsers.

But if you have elements with font-sizes set on them, then any elements nested inside it that have font-size set is thrown off. Example:

<div style='font-size: 108%'>
  <p>This content should be 14px.<p>
  <div style='font-size: 167%'>
    <p>This should be 22px but instead it's 23.38px because it's nested in an element that has a font-size set</p>
    <p>Some other content that is not sized how I expected it to be</p>
  </div>
</div>

Now obviously the above example it easily fixed by allocating font-size‘s to the <p> elements. The example is there only to demonstrate the principal/problem. Anyways, having to individually style each element seems kinda dump.

So I just wanted to see if I was missing something. The system/method completely breaks if your wrap any font-size-styled elements with any other font-size-styled elements. Like what happens if you want all your text on the page to have a base size of 12px instead of 13px, which is the YUI default? Making that change throws off ALL %’s for every element on the page. The only solution would be to leave 13px as the base size and individually style MANY MANY elements with the 12px size.

  • 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-24T22:10:33+00:00Added an answer on May 24, 2026 at 10:10 pm

    Yup, that’s a fundamental shortcoming in using %-based font sizings. There’s no good way around it.

    That being said, unless you have a really good reason to support IE6 I think you should include it (so grids will still work) & then use px/em/etc font sizing instead.

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

Sidebar

Related Questions

I'm using YUI 3 CSS Reset on my page, but want to display a
I'm using YUI file uploader based on flash, and the flash requests host/crossdomain.xml file.
I am using the Yahoo Yui Compressor to compress my css styles. I reference
I am using yui reset: <link rel=stylesheet href=http://yui.yahooapis.com/2.8.0r4/build/reset/reset-min.css/> and I'm having a hard time
I am using YUI reset/base, after the reset it sets the ul and li
I'm using YUI to add drag drop support to a div. It also responds
I'm using YUI's browser history manager, and my browsers no longer report runtime errors.
I am starting using YUI 's Container control in my application to display messagebox
I am currently using YUI datatable, but it is buggy: http://developer.yahoo.com/yui/datatable/ Is there another
I am using YUI's datatable ( http://developer.yahoo.com/yui/datatable/ ) to make a table. But notice

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.