English 中文(简体)
PHP中的辍学率
原标题:Dropdown in PHP

我正在使用SUNOS服务器上的PHP5.2。 在以下法典中存在问题:

echo  <form action="" method="get"> ;
echo  <p>Information:<br /> ;
echo  <select name="acctno" style="width: 100px;"> ;
foreach ($this->account_names as $acctno => $acctname) {
   echo  <option value=" .$acctno. "> .$acctname. </option> ;
   }
echo  </select> <input type="submit" value="view" /> ;
echo  </form> ;

完全精炼的Emtherine和Amc;然而,互联网探索者存在问题。

In IE the dropdown width is limited to the size i.e 100px. So only the first 15-16 characters of the account name are displayed all the time. However in chrome or firefox, even if only 15-16 characters are displayed initially, when the drop down arrow is clicked upon, it show the entire name (however long it may be). This does not happen with IE. So if the account name is, lets say, "1223456789abcdefghijkl" then: For IE: shows only "123456789" all the time Ffor chrome or firefox: shows "123456789" and when it is dropped down it show the full name as "123456789abcdefghijkl". Any help here would be much appreciated.

Thanks, VP

最佳回答

这是一个国际电子浏览器问题。 它可以用 c子固定下来,但你可以使用 j子加以固定。

http://css-tricks.com/select-cuts-off-options-in-ie-fix/

问题回答

这是一个PHP问题,是一个CSS问题。

由于我假定这部法律是正确的,而且这只是一个浏览器所打破的,因此,它带有你必须诊断的browser a specific bug<>。 如果你把与网站或CSS/超文本产出联系起来,帮助我们。

这与PHP没有什么关系。 下降的盒子的长度很可能由中央支助事务办公室处理,而两个浏览器都有自己的限制大小。

Okay, I m is a tad lazy -and optimistic, but having test this in both > and Zheng, albeit only on Hugo 9.10, the theory - 至少是健全的:

<style type="text/css" media="all">

    select  {
        width: 5em; /* initial width, adjust to taste */
        }

    select:focus,
    select:active
        {
        width: 12em; /* the width of the select box in its focussed/active state */
        }

</style>

坦率地说,我怀疑自己在幼儿教育问题上取得了一定的工作——否则,就很容易地认为,要么像其他地方所建议的那样使用<代码><<<>>>/代码>,要么也许会利用“Query/js”来调整<代码>的宽度,使之适应最广泛/最长时间的儿童option

http://davidrhysthomas.co.uk/so/select.html

而且,也是好的庇护所,它也致力于国际电子企业。 也许只有IE8,在XP SP3上有1.0种严格剂量。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

Drop down background url in Safari Issue

selectBox.selectCSS { background: url(/Images/replacementSelectBackground.png) top left no-repeat height:auto; } I have an issue in Safari only where the image is not rendering on top ...

CSS specific for Safari

How do you target specifically safari in css with styles?

Aligning textarea in a form

Ive used the following css code to align my form elements: form { position:relative; } form input { position:absolute; left:11em; } However, the textarea element is not aligned correctly with the ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

CSS problem with page footer

I have defined my page footer in the css file as: #footer { position: absolute; height: 50px; text-align: center; background: #66CCCC; bottom: 0px; left: 0px; width: 100%; height: ...