Question

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!

Was it helpful?

Solution

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.

OTHER TIPS

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

});

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top