Valhalla Legends Archive

Programming => Web Development => Topic started by: Grok on January 25, 2005, 04:23 PM

Title: SELECT width
Post by: Grok on January 25, 2005, 04:23 PM
I've never gotten a select box to fill the width of a table cell.  Someone tell me how?

    <table border="1">
      <tr><th width="200">Groups</th></tr>
      <tr><th>
        <select name="groups" size="20">
          <option>aaa</option>
          <option>bbb</option>
          <option>ccc</option>
          <option>ddd</option>
          <option>eee</option>
          <option>fff</option>
        </select>
      </th></tr>
    </table>
Title: Re: SELECT width
Post by: MyndFyre on January 25, 2005, 04:55 PM
It *should* work this way:

<select name="groups" style="width: 100%;">
...
</select>
Title: Re: SELECT width
Post by: quasi-modo on January 25, 2005, 08:41 PM
You can also use css auto width and stretch the thing out but that would be a bit redundant.

ps: the css above will work. I have used code like that before.
Title: Re: SELECT width
Post by: R.a.B.B.i.T on January 25, 2005, 09:33 PM
http://www.w3.org/MarkUp/html3/menus.html
Title: Re: SELECT width
Post by: Banana fanna fo fanna on January 25, 2005, 09:56 PM
I've found that certain browsers will ignore the CSS on select boxes. I've found that padding with &nbsp;'s works too.
Title: Re: SELECT width
Post by: Grok on January 26, 2005, 09:54 AM
Thanks MyndFyre, exactly what I needed.
Title: Re: SELECT width
Post by: MyndFyre on January 26, 2005, 10:48 PM
Quote from: Grok on January 26, 2005, 09:54 AM
Thanks MyndFyre, exactly what I needed.
<3
Title: Re: SELECT width
Post by: quasi-modo on January 27, 2005, 06:08 AM
Quote from: R.a.B.B.i.T on January 25, 2005, 09:33 PM
http://www.w3.org/MarkUp/html3/menus.html
way to link the outdated stuff.
http://www.w3.org/TR/html4/interact/forms.html#edef-SELECT
Title: Re: SELECT width
Post by: R.a.B.B.i.T on January 29, 2005, 05:58 PM
I got mine from Google, blame them!
Title: Re: SELECT width
Post by: quasi-modo on January 29, 2005, 11:12 PM
Quote from: rabbit on January 29, 2005, 05:58 PM
I got mine from Google, blame them!
Damn google  >:(