[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

Table to always leave 10px and fill popup

I have a bunch of edit forms that are popped up on a click event

This is an Intranet Web App

My master CSS page has a body style with a light blue background

The structure of my popup aspx pages is

<body>
    <form>
         <div>
             <table cellpadding="0" cellspacing="0" border="0" style="background-color:white;">

Here's my problem...

I want my popup so that no matter the popup window size (IE and Firefox)...100 x 100 or 1200 x 800....
I want my  white background table to fill 100% of the window height AND width with a 10px blue "body" margin around the table.

Also...the overflow needs to be hidden so that no scrollbars appear
0
lrbrister
Asked:
lrbrister
1 Solution
 
LZ1Commented:
Take a look at the jQuery UI dialog:http://jqueryui.it/demos/dialog

I've used it plenty of times and it's incredibly easy to configure and style.
0
 
lrbristerAuthor Commented:
LZ1:
This has to be done with styles if at all possible.

We're using Telerik RadControls and the RadWindow Manager

When the radWindow is invoked, it pops up the aspx page with the declared (RadWindow) width and height.

I need the aspx page itself to have the formatting applied that I requested in my post.

0
 
David S.Commented:
Try this. (You don't need those attributes on the <table>.)
/* these styles won't fully work in IE versions before 8 */
html, body, form, form>div:first-child, form>div>table {
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  padding: 10px;
  -moz-box-sizing:border-box;
  -webkit-box-sizing:border-box;
  box-sizing:border-box;
  background: blue;
}
form>div>table {
  background: #fff;
  width: 100%;
  border: 0 none;
  border-spacing: 0;
  border-collapse: collapse;
}
form>div>table th,
form>div>table td {
  padding: 0;
}

Open in new window

> Also...the overflow needs to be hidden so that no scrollbars appear

Are you sure you want to do that? What happens when someone increases the font-size, zooms the page, or resizes the browser window?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mgfranzCommented:
The first question is how are you creating and calling the popup window?  Are you creating a lightbox or an actual new browser windows?

If using a simple JavaScript call to create a new window, controling size and scrollbars is easy;

<script type="text/javascript">
function open_win()
{
window.open("popup.asp","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=yes, width=100, height=100");
}
</script>

Call it like this;

<input type="button" value="Open Window" onclick="open_win()">

After you call the popup page, use standard CSS properties to create a white page with a blue margin;

<head>
      <title>Untitled</title>
      <style type="text/css">
body {
      background-color: #0000cd;
      margin: 10px 10px 10px 10px;
}
table {
      background-color: white;
}
</style>
</head>

<body>
<table cellspacing="0" cellpadding="0" border="0" width="100%" height="100%">
<tr>
      <td>test popup</td>
</tr>
</table>
0
 
mgfranzCommented:
Or perhaps you are looking for a better looking example that doesn't use a browser window at all, only jQuery.  I have used ColorBox, (http://jacklmoore.com/colorbox/) before for what you are doing, it will load an external page, or you can embed the code into a <div> tag and call it internally.
0
 
lrbristerAuthor Commented:
Thanks...will do that with ID and # leader
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now