简体   繁体   中英

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. 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. 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

Meanwhile adding style="float:left;" to the table seems to fix the problem.

(you are also closing body tag twice)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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