0

My Crossrider plugin users the setPopup() function to make a popup when the browserAction icon is clicked.

The problem is that when I click the icon, the popup is long and thin and unusable.

Here is a screenshot of what it looks like...

The tall, thin popup... :(

My background.js code:

appAPI.ready(function() {
    appAPI.browserAction.setResourceIcon('icons/logo38.gif');
    appAPI.browserAction.setTitle('Click here for iStyla preferences');
    appAPI.browserAction.setPopup({resourcePath:'popup.html'});
});

My popup.html has a finite minimum width, so I don't know why the popup's width is so small. I am using Firefox 18.0.2.

Please help me to make the popup wider... Thanks!

Community
  • 1
  • 1
Jacques Blom
  • 1,794
  • 5
  • 24
  • 42

2 Answers2

3

You can control the width and height of the popup from within the popup.html file. Simply style the body tag with the required height and width attributes. For example:

<body style="height:200px; width:300px;">
...
</body>

For more information, see setPopup.

Shlomo
  • 3,763
  • 11
  • 16
0

You can also control the width and the height of the popup through the api

appAPI.browserAction.setPopup({
    resourcePath:'html/popup.html',
    height: 300,
    width: 300

});

piscript
  • 419
  • 5
  • 8