Line spacing with INPUT

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrew Poulos

    Line spacing with INPUT

    If I have a text INPUT within a block of text how do I 'correct' for the
    line spacing. The line spacing above and below the INPUT is larger than
    the line spacing generally:

    <div style="position :absolute; left:100px; top:100px; width:200px;>bl ah
    blah blah blah blah blah blah blah blah blah blah blah blah blah blah
    blah blah blah blah blah blah blah blah blah blah blah blah blah blah
    blah blah blah blah blah blah blah <input type="text" name="option0"
    id="option0" style="border: 1px solid black; text-align: center;" />
    blah blah blah blah blah blah blah blah blah blah blah blah blah blah
    blah blah blah blah blah blah blah blah blah blah blah blah blah blah
    blah blah blah blah blah blah blah blah blah blah blah blah blah blah
    blah blah blah blah blah blah blah blah blah blah blah blah blah blah
    blah blah blah blah blah blah blah blah blah blah blah blah blah blah
    blah blah blah blah blah blah blah blah blah blah blah blah blah blah
    blah blah blah blah blah blah blah blah blah blah blah blah</div>

    The line spacing should be all the same size.

    Andrew Poulos
  • Spartanicus

    #2
    Re: Line spacing with INPUT

    Andrew Poulos <ap_prog@hotmai l.com> wrote:
    [color=blue]
    ><div style=[/color]

    Don't post code to the group, upload a demo, post the url.

    --
    Spartanicus

    Comment

    • Andrew Poulos

      #3
      Re: Line spacing with INPUT

      Spartanicus wrote:[color=blue]
      > Andrew Poulos <ap_prog@hotmai l.com> wrote:
      >
      >[color=green]
      >><div style=[/color]
      >
      >
      > Don't post code to the group, upload a demo, post the url.
      >[/color]
      Oh ok, here's a link
      <url:http://members.iinet.n et.au/~apoulos/fre/test.htm>

      I'm currently testing on Windows IE 6 and the line spacing varies around
      INPUT elements. I wondering what I can do to make the line spacing even
      throughout.

      Andrew Poulos

      Comment

      • Chris Leipold

        #4
        Re: Line spacing with INPUT

        Hi,
        [color=blue]
        > I'm currently testing on Windows IE 6 and the line spacing varies around
        > INPUT elements. I wondering what I can do to make the line spacing even
        > throughout.[/color]
        Have you tried to set the line-height explicitly to the hight of the
        input (including paddings, border and potential margins).

        Chris

        Comment

        • Steve Pugh

          #5
          Re: Line spacing with INPUT

          Andrew Poulos <ap_prog@hotmai l.com> wrote:
          [color=blue]
          >Spartanicus wrote:[color=green]
          >> Andrew Poulos <ap_prog@hotmai l.com> wrote:
          >>
          >>[color=darkred]
          >>><div style=[/color]
          >>
          >>
          >> Don't post code to the group, upload a demo, post the url.
          >>[/color]
          >Oh ok, here's a link
          ><url:http://members.iinet.n et.au/~apoulos/fre/test.htm>
          >
          >I'm currently testing on Windows IE 6 and the line spacing varies around
          >INPUT elements. I wondering what I can do to make the line spacing even
          >throughout.[/color]

          1. Reduce the height of the input box - tricky as you'd also need to
          reduce the font-size inside the input box in order to make the text
          typed in there fully visible which ma make it illegible.

          2. Set the line-height of the whole div to a larger value so all the
          lines have the same spacing.

          3. Don't put input boxes in the middle of flowing copy.

          Steve

          Comment

          • Spartanicus

            #6
            Re: Line spacing with INPUT

            Andrew Poulos <ap_prog@hotmai l.com> wrote:
            [color=blue]
            ><url:http://members.iinet.n et.au/~apoulos/fre/test.htm>[/color]

            That's a mock up with an isolated bit of code on it, it prevent us from
            seeing the context, as a result we can't give proper advice.
            [color=blue]
            >I'm currently testing on Windows IE 6 and the line spacing varies around
            >INPUT elements. I wondering what I can do to make the line spacing even
            >throughout.[/color]

            Text in form fields should be @ 100%, just like body text. Drawing the
            necessary inset form field box around the text should result in a larger
            line height. The solution is not to attempt to reduce the height (not
            possible cross browser IIRC), but not to use form elements inline.

            --
            Spartanicus

            Comment

            Working...