Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Fixed Text Size in HTML Website

  1. #1
    Join Date
    Jan 2006
    Posts
    234
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Arrow Fixed Text Size in HTML Website

    Hi Everybody.

    I did ask this before, but been advised to not do it so I left it alone.
    But now I decided that I want to do anyway.
    Here is what I'm talking about.
    I want that the text in a website can not be resized, like in this website I found here as an example.

    http://global-secureweb.com/index.html

    Please help me out here by telling me what to do to get this result.

    Thank you very much in advance.
    Cheng (Tommy)

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Have you tried viewing that site in Firefox? The text can be resized. In IE, if you specify the font size of a page using absolute units like pixels, text resizing becomes impossible, ie:

    Code:
    <style type="text/css">
    body{
    font-size: 12px;
    }
    </style>
    This is considered a bug though, and in IE7, I have no doubt user enforced text resizing will be fixed/ enabled.

  3. #3
    Join Date
    Jan 2006
    Posts
    234
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your reply.

    Where exacrly do I have to add this:

    <style type="text/css">
    body{
    font-size: 12px;
    }
    </style>

    Underneath the meta tags or where exactly?
    I tried to put it into the head section, but this didn't work.

    Thanks again.
    Cheng (Tommy)

  4. #4
    Join Date
    Jan 2006
    Posts
    234
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    By the way, I don't use a CSS Style sheet on the website I'm needing that for, because I don't know how to use them yet.
    Can this stil be done?
    Because I tried the code you gave me in several places, but with no result.

    Thank you.
    Cheng (Tommy)

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    <style> tags do go in the head; yes.

    Actually, you can still resize, just as ddadmin said. I'm using Safari. Not sure about IE, but i think you can there too.

    Here's the deal with text sizes:

    There are two kinds of sizes-- absolute and relatvie.

    abs:
    <font size="4">
    rel:
    <font size="+1">

    I think (tired at the moment) both of those will actually give you the same size text.

    However, the +1 version (like -1, etc) is 'one more than' the user's default. They have it bigger for a reason, probly due to bad eyesight. (Or smaller, if they like reading lots of little words ^_^)
    The absolute version is just saying 'make it size 4', and that's it. Not related to anything.

    I think that users' defaults may still affect version 2, which is why the css is (*may be) better, but, basically... it's not gonna change much still.

    but... yeah, if you use 12px, instead of a numerical size, you'll still have more control.

    anyway.... you CAN still resize it in most browsers (IE?).

  6. #6
    Join Date
    Jan 2006
    Posts
    234
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Thanks again.

    If that's the case that most people can resize it anyway I think I leave it as it is.
    I just come along quiet afew websites were I cant resize the text in IE 6 so I thought that's a normal thing that can be done, but it looks like I was wrong here.
    Anyway, thanks a lot for your help.
    By the way, this is a great forum here!
    I did received quiet a bit of help here before.

    So long.
    Cheng (Tommy)

  7. #7
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin
    In IE, if you specify the font size of a page using absolute units like pixels, text resizing becomes impossible [...]. This is considered a bug though [...]
    Really, it depends on your perspective. If a unit is absolute, then scaling the text should not affect that portion of the document. The value is definitive.

    The problem with following this notion, however, is that users of that browser will suffer the effects of misuse. If the specified font size is too small, and in the majority of instances on the Web it is, the user is left in a position where they have no means of adjusting the font size short of writing a overriding user style sheet. Whilst the behaviour of Firefox and the like isn't strictly correct, it's very much necessary.

    Note that Opera is slightly different: it zooms, rather than resizes. The entire content, including images, is enlarged or reduced.

    Finally, authors should keep in mind that pixels, as a unit, are actually relative, though not in the same sense as percentages, or the font-relative units em and ex. How something appears on one monitor may look fine and be perfectly readable. However, on a laptop, for example, it may be miniscule. This is why pixels shouldn't really be used when assigning dimensions (except in obvious cases, like images).


    Quote Originally Posted by djr33
    There are two kinds of sizes-- absolute and relatvie.

    abs:
    <font size="4">
    rel:
    <font size="+1">
    Ack! Don't ever use the font element. Ever. Google for why it's considered harmful. If the OP doesn't know how to use style sheets, this is a good time to start. It isn't difficult, certainly for trivial things like setting a type face.

    Mike

  8. #8
    Join Date
    Jan 2006
    Posts
    234
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Arrow

    Hi Mike.

    Thanks again for your reply.
    By now I did publish the site to the web already without a fixed font size.
    Also I'm not a web designer, I just did a few websites, but more or less for personal reasons.
    Like my 1st homepage I ever did for example:

    My 1st Homepage

    This one is placed on a free server.
    I liked this server, because there is no advertising at all except one popup when you open the index page, but any good pop blocker takes care of that.

    I'm just showing you this so you get an idea what my skil level is.
    And that level is not very high.
    Anyway, thanks a lot for your help.
    So long.

    Cheng (Tommy)

  9. #9
    Join Date
    Mar 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I look at your site. I was impressed. You have done a good job Keep it up. However one thing I don't like is the popup windows. Maybe you can disable it, it annoys users
    __________________
    Blogging Tips | Google The Red Planet

  10. #10
    Join Date
    Jan 2006
    Posts
    234
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Hi Mike.

    Thanks for your comment about the website.
    As I said in the message above, the site is hosted on a free server and I can't do anything about the popup ad on the index page, but in my case "Google Toolbar Popup Blocker" takes care of that and I thought most people have popup blockers these days.
    It is free web space and I think therefore it's alright with just one popup.
    But if you know a host where I can upload the website for free and there are no ads and pop-up's, I probably would host the site there.

    Thanks again.
    Cheng (Tommy)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •