开发者

Drop down box is always 100%

I have the following HTML:

<div style="30px;">
  <table width="100%;">
    <tr>
      <td>
        <SELECT name="guidelinks">
          <OPTION SELECTED value="jex6.htm">Page 1
          <OPTION value="jex7.htm">My Cool Page
        </SELECT> 
      </td>
    </tr>
  </table>

When this drop down box is displayed the width is 100%, not 30px, can an开发者_如何学Goyone explain why and how to fix this?

Unofrtunatly I cant edit the code on the CSS


you will need to give a specific width to the select element itself ..

<select style="width:30px;" name="guidelinks">...


You have an error in your div's style tag:

<div style="30px;">

should be

<div style="width:30px;">

30px is a VERY narrow width, mind you. I would make it at least 5 times wider.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜