|
-
Feb 21st, 2001, 06:10 AM
#1
Thread Starter
Hyperactive Member
Does anybody know a way to change the width of a select box in HTML? I've tried the usual like width=6000, but it doesn't make the slightest bit of difference. I know it stretches automatically depending on the size of the longest text, but for looks on the screen I want to make the box wider. Anyone got any ideas?
-
Feb 21st, 2001, 08:46 AM
#2
Fanatic Member
Setup the width with the syle attribute:
Code:
<html>
<head>
<title>How wide do you want it!</title>
</head>
<body>
<table width="100%" height="50%" border="1">
<tbody>
<tr>
<td width="50%">My sizing list</td>
<td>
<select style="width:100%;height=100%" size="5">
<optgroup label="">
<option value="1">1st Item</option>
<option value="2">2nd Item</option>
<option value="3">3rd Item</option>
<option value="4">4th Item</option>
<option value="5">5th Item</option>
<option value="6">6th Item</option>
</optgroup>
</select>
</td>
</tr>
</tbody>
</table>
<p>This will size itself to the size of the table cell</p>
</body>
</html>
-
Feb 21st, 2001, 09:20 AM
#3
Thread Starter
Hyperactive Member
thanks very much for that. may i just ask, what does the tbody do?
-
Feb 21st, 2001, 09:44 AM
#4
Fanatic Member
If you specify attributes in the <TBODY> tag (Font, BGcolor etc.), then they will be used in the body of the table, then revert to the original page formatting after the </TBODY> tag.
This tag was added automatically by XMLspy which I used to build this example.
-
Feb 21st, 2001, 10:00 AM
#5
Thread Starter
Hyperactive Member
cheers very much for your time.
-
Feb 21st, 2001, 11:45 AM
#6
PowerPoster
that listbox width is IE only (what isin't these days)
What browsers is <tbody> supported under? Will it work in NS 4.x?
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Feb 21st, 2001, 12:06 PM
#7
Fanatic Member
TBODY
From MSDN:
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script as of Microsoft® Internet Explorer 4.0.
See the HTML 4.0 standards
-
Feb 21st, 2001, 01:14 PM
#8
PowerPoster
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|