开发者

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


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)


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.


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜