Input Width

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

    Input Width

    Hello,

    I defined the width of a form input as follows:

    fieldset input {width: 24em;}

    But then the checkbox inputs also get a width. So I uses the
    following:

    <input name="IsPublish ed" id="IsPublished " type="checkbox"
    class="test" value="Yes" />Check to publish

    fieldset input.test {width: auto;}

    But I wasn't able to reset the width. Any idea why? I also tried with:

    fieldset input.test {width: 10px;}

    It didn't work either.

    Thanks,
    Miguel

  • Jonathan N. Little

    #2
    Re: Input Width

    shapper wrote:
    Hello,
    >
    I defined the width of a form input as follows:
    >
    fieldset input {width: 24em;}
    >
    But then the checkbox inputs also get a width. So I uses the
    following:
    >
    <input name="IsPublish ed" id="IsPublished " type="checkbox"
    class="test" value="Yes" />Check to publish
    >
    fieldset input.test {width: auto;}
    >
    But I wasn't able to reset the width. Any idea why? I also tried with:
    >
    fieldset input.test {width: 10px;}
    >
    It didn't work either.
    Is what you are wanting

    input[type="text"] { width: 24em; }

    ?



    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO

    Comment

    • shapper

      #3
      Re: Input Width

      On Aug 19, 6:08 pm, "Jonathan N. Little" <lws4...@centra l.netwrote:
      shapper wrote:
      Hello,
      >
      I defined the width of a form input as follows:
      >
      fieldset input {width: 24em;}
      >
      But then the checkbox inputs also get a width. So I uses the
      following:
      >
      <input name="IsPublish ed" id="IsPublished " type="checkbox"
      class="test" value="Yes" />Check to publish
      >
      fieldset input.test {width: auto;}
      >
      But I wasn't able to reset the width. Any idea why? I also tried with:
      >
      fieldset input.test {width: 10px;}
      >
      It didn't work either.
      >
      Is what you are wanting
      >
      input[type="text"] { width: 24em; }
      >
      ?
      >
      --
      Take care,
      >
      Jonathan
      -------------------
      LITTLE WORKS STUDIOhttp://www.LittleWorks Studio.com
      Wow, it worked fine ... didn't know that ... but is there ok for all
      browsers?

      Thanks,
      Miguel

      Comment

      • Jukka K. Korpela

        #4
        Re: Input Width

        shapper wrote:
        I defined the width of a form input as follows:
        >
        fieldset input {width: 24em;}
        OK.
        But then the checkbox inputs also get a width.
        Indeed.
        So I uses the following:
        >
        <input name="IsPublish ed" id="IsPublished " type="checkbox"
        class="test" value="Yes" />Check to publish
        >
        fieldset input.test {width: auto;}
        Fine. It's more primitive than using input[type="checkbox"] but works much
        more often (namely on IE 4, IE 5, IE 6, and IE 7 in quirks mode as well as
        on better browsers).
        But I wasn't able to reset the width. Any idea why?
        You didn't quite do what you wrote here. A URL would have made it possible
        to tell what you did wrong.

        P.S. In future when replying, don't quote everything, just the relevant
        part. On Usenet, fullquoting indicates lack of comprehensive reading.

        --
        Yucca

        Comment

        Working...