HTML form design tip - font size of text input elements - IE7 vsFirefox

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jukka K. Korpela

    #16
    Re: HTML form design tip - font size of text input elements - IE7 vs Firefox

    Scripsit Diogenes:
    Ah, I stand corrected. The possibility had not occurred to
    me for two reasons.
    Actually, I think the explanation is rather that you didn't read good CSS
    tutorials but made wild assumptions, conjectures, and guesses in general.
    1) a browser setting a fixed font-size for an element
    strikes me as being kind of silly - going against the whole
    inheritance idea. Silly me for assuming this.
    Well, it is silly, but hardly sillier than authors who routinely set the
    font size to (say) 10px. "The whole inheritance idea" is completely
    misunderstood by most people who write about "inheritanc e", so I'll skip it
    here.
    2) INPUT { font-size: 100% } (or any value) did absolutely
    nothing in IE,
    Wrong. It worked. You use a _different_ rule, one with an attribute
    selector, and then it was the selector that caused the problem; it would
    cause it for any property.
    Re-reading Mr. Korpela's post, I am now assuming that the
    100% rule was necessary in IE6 to get past a fixed size
    limitation in IE5.
    Try re-re-reading it. Actually, I think you should read posts more carefully
    in the first occasion, instead of massively quoting them. Comprehensive
    quotations are an almost sure sign of lack of comprehensive reading.
    I'm still trying to figure out a best practice here.
    You seem to have missed the best of the FAQ resources of this group and seem
    to keep doing so, making your attempts rather pointless.
    When I
    set out building a web page, I usually set the BODY element
    to { font-size: 10pt; font-family: sans-serif }
    That's destructive. Even font-size: 83% would be less bad. It's illogical,
    but at least it (mostly) lets IE users get a font size they can read, by
    selecting (for example) the Large option in the Font size menu.
    I want the page and the form content to be consistent in
    appearance.
    You seem to be thinking that the font size in copy text should be the same
    as in form fields. That's questionable. They (almost certainly) have
    different font face, unless you do something about this, and 10pt fonts may
    look very different in size.
    INPUT[type="text"] { font-size: 10pt }
    You're solving a wrong problem a wrong way.
    We seemed to have established 4 things here
    >
    1) IE5 had a fixed font size, 11pt, for it text input elements
    Wrong. The size is 13px. With a normal resolution, this corresponds to
    9.75pt.

    If things look different to you, the reason is probably in the difference of
    fonts. The default font face for input elements has a large x-height and
    other properties that make it look bigger than most fonts in the same size.
    2) IE6 honoured the INPUT { font-size: xx% } CSS selectors,
    Yes, except that it's not a selector but a rule.
    but does not recognize the INPUT[type="text"} selectors.
    Yes, that's clear. And it's not really serious when you know it, since you
    can use different types of selectors.
    3) IE7 recognizes both types of selectors but only in
    standards mode.
    Indeed.
    4) The form of the Document declaration is important to
    avoid triggering *Quirks Mode*.
    Yes.

    But after these mostly correct conclusions you jump into somthing pointless:
    So, to create a form that looks as similar as possible
    across as many browsers as possible:
    Why would you do that? What have you got against the existence of different
    browsers? Different people use different browsers partly just because they
    display pages differently.
    Should I even care about IE5?
    Not much as such, but it mostly comes as extra when test your pages on IE 7
    in quirks mode.

    --
    Jukka K. Korpela ("Yucca")


    Comment

    • Diogenes

      #17
      Re: HTML form design tip - font size of text input elements - IE7vs Firefox

      Jukka K. Korpela wrote:
      Scripsit Diogenes:
      >
      >Ah, I stand corrected. The possibility had not occurred to
      >me for two reasons.
      >
      >
      Actually, I think the explanation is rather that you didn't read good
      CSS tutorials but made wild assumptions, conjectures, and guesses in
      general.
      >
      Uh right, my bad.
      >1) a browser setting a fixed font-size for an element
      >strikes me as being kind of silly - going against the whole
      >inheritance idea. Silly me for assuming this.
      >
      >
      Well, it is silly, but hardly sillier than authors who routinely set the
      font size to (say) 10px. "The whole inheritance idea" is completely
      misunderstood by most people who write about "inheritanc e", so I'll skip
      it here.
      >
      Thank-you Jukka, for saving us from the brain hurt that
      would, no doubt, be inflicted on us lower level simians in
      the event that you did attempt an explanation!

      You are, indeed, destined for higher purpose - to routinely
      point out where others are wrong, and to inspire them to
      seek the truth by alleging their ignorance and making vague
      allusions to better resources elsewhere, without ever
      providing them yourself.
      >2) INPUT { font-size: 100% } (or any value) did absolutely
      >nothing in IE,
      >
      >
      Wrong. It worked. You use a _different_ rule, one with an attribute
      selector, and then it was the selector that caused the problem; it would
      cause it for any property.
      >
      Wrong! It DID NOT work; not in the *quirks* mode context I
      was in. Nice selective snipping there. You work for a tabloid?
      >Re-reading Mr. Korpela's post, I am now assuming that the
      >100% rule was necessary in IE6 to get past a fixed size
      >limitation in IE5.
      >
      >
      Try re-re-reading it. Actually, I think you should read posts more
      carefully in the first occasion, instead of massively quoting them.
      Comprehensive quotations are an almost sure sign of lack of
      comprehensive reading.
      >
      see previous comment...

      A yes or no answer here, even without explanation, would
      have been more useful.
      >I'm still trying to figure out a best practice here.
      >
      >
      You seem to have missed the best of the FAQ resources of this group and
      seem to keep doing so, making your attempts rather pointless.
      >
      see previous comment...
      >When I
      >set out building a web page, I usually set the BODY element
      >to { font-size: 10pt; font-family: sans-serif }
      >
      >
      That's destructive. Even font-size: 83% would be less bad. It's
      illogical, but at least it (mostly) lets IE users get a font size they
      can read, by selecting (for example) the Large option in the Font size
      menu.
      >
      >I want the page and the form content to be consistent in
      >appearance.
      >
      >
      You seem to be thinking that the font size in copy text should be the
      same as in form fields. That's questionable. They (almost certainly)
      have different font face, unless you do something about this, and 10pt
      fonts may look very different in size.
      >
      >INPUT[type="text"] { font-size: 10pt }
      >
      >
      You're solving a wrong problem a wrong way.
      >
      At the risk of being boring, see previous comment ...
      >We seemed to have established 4 things here
      >>
      >1) IE5 had a fixed font size, 11pt, for it text input elements
      >
      >
      Wrong. The size is 13px. With a normal resolution, this corresponds to
      9.75pt.
      >
      You may be right.
      If things look different to you, the reason is probably in the
      difference of fonts. The default font face for input elements has a
      large x-height and other properties that make it look bigger than most
      fonts in the same size.
      >
      >2) IE6 honoured the INPUT { font-size: xx% } CSS selectors,
      >
      >
      Yes, except that it's not a selector but a rule.
      >
      And if I ever write a book, you can be my editor! ;-)
      >but does not recognize the INPUT[type="text"} selectors.
      >
      >
      Yes, that's clear. And it's not really serious when you know it, since
      you can use different types of selectors.
      >
      Actually, it's not all that clear.

      I referenced the excellent wiki web page on CSS browser
      compatibility:

      http://en.wikipedia.org/wiki/Compari...t_engines_(CSS)

      From this I knew that an element type selector like

      INPUT [type="text"]

      would work in IE7 but not in previous versions.

      I now know, *thanks to you, Jukka*, that I can control the
      font-size (and other attributes, I assume) across all INPUT
      elements *in IE6* with a simple INPUT selector.

      OMG - I believe I just thanked you!
      (Editor - Can we cut this out after it's posted?)

      I am also much more aware now of avoiding *quirks mode* in
      IE. This is a very happy coincidence of my original post
      because it was peripheral to my knowledge of CSS itself.
      >3) IE7 recognizes both types of selectors but only in
      >standards mode.
      >
      >
      Indeed.
      >
      >4) The form of the Document declaration is important to
      >avoid triggering *Quirks Mode*.
      >
      >
      Yes.
      >
      OMG - now you're agreeing with me! This is going badly indeed.
      But after these mostly correct conclusions you jump into somthing
      pointless:
      >
      >So, to create a form that looks as similar as possible
      >across as many browsers as possible:
      >
      >
      Why would you do that? What have you got against the existence of
      different browsers? Different people use different browsers partly just
      because they display pages differently.
      >
      Because I subscribe to the Bill Gates / Henry Ford blended
      business model. You can use any browser you want as long as
      its Microsoft. Life would be much easier if there was only
      one kind of car, wouldn't it? We could call it a 'Jukka' if
      you want.

      And with that kind of economy of scale to your advantage,
      everyone can have a Volkswagen for the price of a Rolls
      Royce, uh wait... I meant that the other way around.

      (Note to self - must get bigger brain fast! Getting things
      mixed up again)
      >Should I even care about IE5?
      >
      >
      Not much as such, but it mostly comes as extra when test your pages on
      IE 7 in quirks mode.
      >
      Thanks for the tip Jukka!

      And, once again, thanks to all the others who posted.

      I have a better handle now on a form design pattern that
      should work for the biggest audience. This thread has been
      very helpful to me. I think it will help others.

      IE7 market penetration may be somewhat anecdotal here, but
      hey, the numbers sure look interesting.

      Newsgroups can be tough to deal with. No wonder most users
      are lurkers. No need to mention the emotion and wasted time
      attached to a flame war - so I won't ;-).

      The solution to my problem was posted in a remarkable 17
      minutes by Steve Pugh (thanks again Steve). That was the
      first response!

      And it just kept getting more interesting.

      Cheers
      Jim

      Comment

      • Jukka K. Korpela

        #18
        Re: HTML form design tip - font size of text input elements - IE7 vs Firefox

        Scripsit Diogenes:
        You are, indeed, destined for higher purpose - to routinely
        point out where others are wrong, and to inspire them to
        seek the truth by alleging their ignorance and making vague
        allusions to better resources elsewhere, without ever
        providing them yourself.
        Thank you for your eloquent appraisal, but I am still far below the level of
        Socrates, though not as much below Diogenes as you are, with your forged
        identity behind which you make personal attacks in public, thereby
        classifying yourself much below the simian level.

        Consider yourself plonked. Thank you for letting me do this knowing that I
        won't miss anything of value. It was a bit tough to try to find out whether
        you had something to say in the midst of massive quoting and pointless
        babbling.
        And if I ever write a book, you can be my editor! ;-)
        You wish. And I don't recommend that you try writing a book before first
        reading one.

        --
        Jukka K. Korpela ("Yucca")


        Comment

        • Felix Miata

          #19
          Re: HTML form design tip - font size of text input elements - IE7vs Firefox

          On 2007/02/26 16:36 (GMT) Diogenes apparently typed:
          Jukka K. Korpela wrote:
          >Scripsit Diogenes:
          >>1) IE5 had a fixed font size, 11pt, for it text input elements
          >Wrong. The size is 13px. With a normal resolution, this corresponds to
          >9.75pt.
          You may be right.
          He's partially right. 13px does correspond mathematically to 9.75pt at the
          windoz default 96 DPI. However, IE, as does all of windoz, works in pt, not
          px. IE only uses px as it may be called upon by CSS to do so. So, on a page
          using unstyled form controls, if it looks like 10pt, that would be because
          10pt was specified by the system, and not 9.75pt. Reboot doze into 120 DPI,
          and 9.75pt will no longer match 10pt in either FF or IE.

          Not all browsers round the same, and not all operating system's font
          subsystems round the same. Take a look at
          http://mrmazda.no-ip.com/auth/Font/font-rounding.html and particularly its
          bottom section of pt only on both IE and FF on windoz running at 96 DPI and
          you should see a size match (if you don't have the same default font family
          set on both you may not), but the upper sections will not exactly size
          match. Compare again on FF between windoz and Linux at 96 DPI, and you'll
          likely (depending on Linux version) see the top two sections size match, but
          not the bottom one.
          --
          "If we claim to be without sin, we deceive ourselves and the
          truth is not in us." 1 John 1:8 NIV

          Team OS/2 ** Reg. Linux User #211409

          Felix Miata *** http://mrmazda.no-ip.com/

          Comment

          Working...