简体   繁体   English

在Google-Chrome扩展程序中更改popup.html的大小

[英]Changing the size of popup.html in a google-chrome extension

I have a chrome-extension with a popup.html file that creates a form that is too big. 我有一个带有popup.html文件的chrome扩展名,该文件创建的表单太大。 Here is my code: 这是我的代码:

<html>
<head>
<title></title>
</head>
<body>

<table border="" cellpadding="3" cellspacing="0" id="mytable">

<tbody><tr><td>Song:</td> <td><input type="text" name="song" size="30" /> </td></tr>
<tr><td>Artist:</td> <td><input type="text" name="artist" size="30" /> </td></tr>
</tbody></table>

<input onclick="sendRequest()" type="button" name="method" value="Search" height="10"/>
<input onclick="help()" type="button" name="method" value="Help" height="10"/>

</body>
</html>

The form created by this code extends about 25 pixels lower after the buttons end. 此代码创建的窗体在按钮结束后向下延伸约25个像素。 What is causing this? 是什么原因造成的?

EDIT: I realized that this might be caused by a minimum size issue that chrome may have. 编辑:我意识到这可能是由铬可能存在的最小尺寸问题引起的。 Is there a way to change the minimum size? 有没有办法改变最小尺寸?

Interesting bug, seems like it calculates popup height incorrectly if table contains input elements (without them looks fine). 有趣的错误,如果表包含输入元素(看起来没有问题),似乎错误地计算了弹出高度。 You can try to file a bug report to http://crbug.com 您可以尝试将错误报告提交到http://crbug.com

Meanwhile adding style="float:left;" 同时添加style="float:left;" to the table seems to fix the problem. 到表似乎可以解决问题。

(you are also closing body tag twice) (您还将两次关闭身体标签)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM