Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Member nepharo's Avatar
    Join Date
    Jun 2003
    Posts
    73
    Member #
    1729
    I had this trouble for some time. this code:
    body{ font-size: 10pt; }

    does not set the size of the overall font in the document. It doesn't work at all for me. I don't wanna have to set the size in each class specifically. so, what's up?
    I cannot self terminate, you must lower me into the fire.

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Try:
    Code:
    body, li, p, div (etc.) {font-size:10pt}
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Member a-drive's Avatar
    Join Date
    Mar 2003
    Posts
    94
    Member #
    809
    Originally posted by nepharo
    I had this trouble for some time. this code:
    body{ font-size: 10pt; }

    does not set the size of the overall font in the document. It doesn't work at all for me. I don't wanna have to set the size in each class specifically. so, what's up?
    It does set the size actually, you must be be re-defining the font size for an id and thinking it's not working because of that.

    Also, it's not actually best to set the size [example; 10px, 12px etc] as this does give it a set size meaning it'll appear the same size on any computer no matter the resolution of the screen, which means in some cases it could be barely readable.

    Instead, use font-size: small *small can be replaced with
    • xx-small
    • x-small
    • small
    • medium
    • large
    • x-large
    • xx-large


    Using these instead is much better as the user is able to change the size according to his needs by going to; View > Text Size > ...

    My suggestion: Always set the font size to one of the ones given in the bulleted list.

  5. #4
    Member nepharo's Avatar
    Join Date
    Jun 2003
    Posts
    73
    Member #
    1729
    filburt,
    what's the difference between your code and mine?
    I cannot self terminate, you must lower me into the fire.

  6. #5
    Junior Member Cinders117's Avatar
    Join Date
    Mar 2003
    Location
    Kent, OH
    Posts
    19
    Member #
    833
    I'm guessing you're using a table just because thats been a mistake of mine before.

    Use Filburt's code except add TD in there too. What his is doing is saying that for all of those types, body, list, paragraph, etc to set the style like that(you coould do them all seperately but why not go for the easier way) and that way you're "sure" to have the browser know you want those to be styled like that.
    Took me a little while to figure out why my fonts were never setting right and its because you have to tell it to apply that to the column in the table also.

  7. #6
    Junior Member
    Join Date
    Jun 2003
    Location
    new zealand
    Posts
    1
    Member #
    1930
    try setting variable element likes of
    .j{font-size:10pt} this affects all elements of the style.
    #j{font-size:10pt} this affects only j elements of the style.
    what font are you using?

    <div id ="j">
    any thing u have in here the fonts are affected by the style.

    </div>

  8. #7
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Re: Re: css body font size

    Originally posted by a-drive
    Using these instead is much better as the user is able to change the size according to his needs by going to; View > Text Size > ...

    My suggestion: Always set the font size to one of the ones given in the bulleted list.
    You can actually use one of three systems for ADA-compatible "scalable" fonts:
    • named font sizes (the ones a-drive listed)
    • em font sizes (in the format font-size: 1.5em;), or
    • % font sizes (in the format font-size: 80%;)


    em font sizes scale relative to the base scale, and aren't limited like named font sizes.

    % font sizes scale relative to the current font size (as specified by the parent element... body by default).


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:37 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com