【问题标题】:Consecutive image layout in Google ChromeGoogle Chrome 中的连续图像布局
【发布时间】:2013-02-27 12:39:19
【问题描述】:

我正在开发一个网站,该网站的界面包含一系列 12 个 ASP.NET ImageButton 控件 - 六个在顶部,六个在底部。这些呈现为<input type="image" /> HTML 元素。它们应该从左到右排列,如下面的屏幕截图所示。

直到最近,标记正确地布置了 Firefox、IE 和 Chrome 中的图标。最近一位客户注意到,在 Chrome 中,图像不是水平排列的,而是一个在另一个之上,如下面的屏幕截图所示。

您可以在http://fuzzylogicinc.net/demos/snippet.html 看到正在运行的标记。如果您使用 IE 或 Firefox 查看按钮,则按钮布局正确,从左到右。如果您在最新版本的 Chrome 中查看,按钮会从上到下排列。

显然,标记是相同的,并且在上面的 demo/sn-p 中有最小的样式。我需要做什么才能让它在 Chrome 中运行?

这是图像按钮的(缩写)标记。没有应用其他样式。

<input type="image" name="..." id="..." title="General Invoice" src="..." style="height:20px;border-width:0px;" />

<input type="image" name="..." id="..." title="General Invoice" src="..." style="height:20px;border-width:0px;" />

<input type="image" name="..." id="..." title="General Invoice" src="..." style="height:20px;border-width:0px;" />

...

<br />

<input type="image" name="..." id="..." title="General Invoice" src="..." style="height:20px;border-width:0px;" />

<input type="image" name="..." id="..." title="General Invoice" src="..." style="height:20px;border-width:0px;" />

<input type="image" name="..." id="..." title="General Invoice" src="..." style="height:20px;border-width:0px;" />

...

谢谢!

【问题讨论】:

  • ur td 宽度导致问题 - 它的 100% .. 使它成为 - style="white-space: nowrap;"对于按钮行(第一行)
  • @user1428716 没错——你应该把它作为答案

标签: html google-chrome


【解决方案1】:

您的 td 宽度导致问题 100% .. 使它成为 - style="white-space: nowrap;"对于按钮行(第一行)

 <tbody><tr><td>..<td>..
 <td  style="white-space: nowrap;">
 <input type="submit" name="ctl00$Content01$btnGotoOrderNumber" value="Go" .....

【讨论】:

  • 成功了,谢谢一百万!您知道为什么修复之前的标记更早起作用吗?几个月前,我们使用 Chrome 进行了测试,没有出现任何问题。
  • @ScottMitchell Chromium 错误 - code.google.com/p/chromium/issues/detail?id=118309
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-11-25
  • 2011-08-13
  • 1970-01-01
  • 2019-05-30
  • 1970-01-01
  • 1970-01-01
  • 2012-10-27
相关资源
最近更新 更多