SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist
    Join Date
    Nov 2000
    Posts
    427
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    "&nbsp" inside tags for Netscape

    Which browsers need an "&nbsp" inside empty tags in order to be displayed properly? Netscape is the only one I know of, but which versions of Netscape require that? What other quirky things like that should I know as an HTML writer? Thanks!
    But what care I for praise? - Bob Dylan

  2. #2
    Weird Little Girl Desdelena's Avatar
    Join Date
    May 2002
    Location
    Canada
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What other quirky things like that should I know as an HTML writer?
    Well the first thing you should know is to NEVER leave an empty tag in the first place. If you want your colors to be reliable use HEX or RBG codes and NOT color names. When setting font sizes use pixels (px) and not points (pt) or 1,2,3 ect. And close all the tags you open (with a few exceptions).

  3. #3
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, don't use px for font sizes. This is one of my pet peeves.

    Consider two users. One has a 1600x1200 screen and the other has a 640x480 screen. A tiny font on the first user's screen will appear fairly large on the second user's monitor.

    Also, if a person is using large fonts due to a vision disability or just a preference, his browser won't resize your fonts. He won't be able to read your page, and you will have just lost a visitor.

    The solution? Use em or percents. See this A List Apart article for more info: http://www.alistapart.com/stories/sizematters/ .

  4. #4
    SitePoint Evangelist
    Join Date
    Nov 2000
    Posts
    427
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    qslack-

    Doesn't that article say not to use em or percents?

    "This method works as expected even when the selected elements are nested. By contrast, when you use em or percents for font size on elements that may nest, like <body>, <td>, <div> or <li> (as is effectively required by browsers with screwy inheritance models like WinIE4/5), there is always the danger that they will compound, resulting in type that is too small or too large. Keywords are never too small, because as implemented in IE and Mozilla/Netscape 6, xx-small is always above the 9px threshold of adequate resolution for most fonts, regardless of the "medium" value."

    Am I reading it wrong?
    But what care I for praise? - Bob Dylan

  5. #5
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To tell the truth, I have skimmed over that article several times as a reference but I have never actually read it through (until you mentioned the conflict).

    I think that he is working under the assumption that you do not want to support Netscape 4 when he says to use xx-small. You obviously do want to support NS 4, so percents and em will work best for you.

    Just keep in mind that if you do use percents or ems, they will inherit. So if you set the <body> tag to 50%, then the <p> tag to 10%, text inside a <p> tag will actually be 5%. That's because it takes 10% of 50%, not just 10%. Besides that, percents and em are the way to go.

  6. #6
    Weird Little Girl Desdelena's Avatar
    Join Date
    May 2002
    Location
    Canada
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by qslack
    Actually, don't use px for font sizes. This is one of my pet peeves.

    Consider two users. One has a 1600x1200 screen and the other has a 640x480 screen. A tiny font on the first user's screen will appear fairly large on the second user's monitor.

    Also, if a person is using large fonts due to a vision disability or just a preference, his browser won't resize your fonts. He won't be able to read your page, and you will have just lost a visitor.

    The solution? Use em or percents. See this A List Apart article for more info: http://www.alistapart.com/stories/sizematters/ .
    Unfortunatley my attention wore off far before I could finish reading it. Anyhow my reason for saying use pixels instead of anything else is as follows:

    • NN renders sizes slightly differently and using a 12pt font will not be the exact same size as a 12pt font in IE or another browser. Using pixels creates the closest match.
    • Using pixels prevents people from adjusting the browsers medium, small and large or whatever. More than often doing so ruins a sites appearance.

    Basically it keeps things more the same between different users computers. The font may appear tiny on a screen resolution of 1600 vs 640 but its still going to take up the same amount of screen space (amount in pixels). Its like using frames set to 25% and 75%. Using a percentage is way more likely to muck up your design than using a pixel value. Just 25% may be enough screen space on someone who has a resolution of 1600 but it may not be for someone who is using 800 resolution. Few people use a resolution that high or low anyhow. I aim for the standard resolutions 800x600 and 1024x768.


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
  •