Reputation: 95020
I am creating a Google Chrome extension that does some basic search based on the choices provided.
This is how it looks so far
The problem is that there is a lot of white space on the sides which does not look good, especially because this is a popup and overlays on the current page.
How can I make sure that the popup uses the minimum amount of space required?
Upvotes: 0
Views: 6787
Reputation:
as nkorth said, this is quite easy, using CSS. Let me write out the code for you:
<html>
<head>
<style type="text/css">
body {
width: 200px;
height: 200px;
overflow: hidden;
}
</style>
</head>
<body>
text text text
</body>
</html>
Upvotes: 5
Reputation: 1694
It should be as simple as styling the body
element. Do you want a fixed size, fixed width, or just less margins? For fixed size, you should use overflow:scroll
or overflow:hidden
along with the appropriate width
and height
. For fixed width, use width
and optionally min-height
. For any of these, you should check the margins on all the block-level elements to see if that's where your whitespace is coming from.
Upvotes: 4
Reputation: 5272
You can follow Debugging Tutorial to inspect this popup.
Maybe set the min-width
property to body
element could fix it. If not, please append the html code, we can check it later.
Upvotes: 1