Skizit
Skizit

Reputation: 44842

popup.html - change width?

How do I change the width of popup.html? I've attempted changing the width of the div in it but that seems to have no effect.

Here is what I've tried...

<div id='poppingup' style = "min-width: 300px; display:none">

Upvotes: 43

Views: 39915

Answers (4)

Ronak Munjapara
Ronak Munjapara

Reputation: 689

In my case, I am using

popup.css

file for styling so inside this CSS file i have done the following code as per the popup size requirement and it works for me.

html
{
    width: 1000px; /* max: 1000px */
    height: 750px; /* max: 750px */
}

Upvotes: 0

Jdruiter
Jdruiter

Reputation: 355

Changing the css didn't work for me.

You can do it with javascript:

<script>
window.resizeTo(1920, 768);
</script>

Or if you want to accomodate all screen sizes:

<script>
var newheight = window.height * (5/10);
var newwidth = window.width * (7/10);
window.resizeTo(newheight, newwidth);
</script>

Upvotes: 1

legendlee
legendlee

Reputation: 578

I tried to change the width of body too, but it didn't work. You can set the width of html tag:

<html xmlns="http://www.w3.org/1999/xhtml" style="min-width:600px;">

It worked in my project.

Upvotes: 17

serg
serg

Reputation: 111265

Popup width is determined by the visible content, so either make your div visible or apply min-width to body:

body {
    min-width:300px;
}

(there is also a limit on max width, I think it is 800px)

Upvotes: 80

Related Questions