469,594 Members | 2,111 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,594 developers. It's quick & easy.

Height of Master Page

Hi All,

Newbie here again.

I have a master page setup that is a two-column table. The left is a table
of contents, the right the target. I want the left column to always take up
100% of the height of the browser (or, to put it another way, I want the
content to take up 100% of the right column if it is smaller than the
height). Is there a way to do that?

Setting the height property or style to 100% doesn't do it - it only resizes
to 100% of the content of the cell.

Also, I'd like to resize the cells to take up 100% of the height if the
window is resized.

Thanks,
pagates
Sep 15 '06 #1
5 8205
Set up the table itself to 100% and then constrain the portions that are a
set size. That should solve this problem.

Once again, the basic HTML quesitons can be answered better in groups like
the FrontPage and Expressions groups. While the do not deal with
MasterPages, these types of issues are common to all HTML pages.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
"pagates" <pa*****@discussions.microsoft.comwrote in message
news:C4**********************************@microsof t.com...
Hi All,

Newbie here again.

I have a master page setup that is a two-column table. The left is a
table
of contents, the right the target. I want the left column to always take
up
100% of the height of the browser (or, to put it another way, I want the
content to take up 100% of the right column if it is smaller than the
height). Is there a way to do that?

Setting the height property or style to 100% doesn't do it - it only
resizes
to 100% of the content of the cell.

Also, I'd like to resize the cells to take up 100% of the height if the
window is resized.

Thanks,
pagates

Sep 15 '06 #2
Hi Cowboy,

The table is set up to 100% (See below). It doesn't seem to matter. Note:
I posted here because this is a Master Pages question. If I take the same
table defintion, remove the ASP elements, and save it as a pure HTML file, it
sizes appropriately.

Notice I set the border="1" on the table to see the outline.

Thanks,
pagates

<body>
<form id="form1" runat="server">
<div title="Some Title">
<table border="1" cellpadding="0" cellspacing="0" style="width:
100%; height: 100%" rules="none">
<tr valign="top">
<td style="width: 200px; background-image:
url(ContentBackground.jpg); background-repeat: repeat-y;" align="center">
<asp:Label ID="Label1" runat="server" Font-Bold="True"
Font-Underline="True" Text="Please Select A Format"
Width="100%"></asp:Label></td>
<td rowspan="2">
<asp:ContentPlaceHolder ID="cphTarget" runat="server">
Please send e-mail to...
</asp:ContentPlaceHolder>
</td>
</tr>
<tr valign="top">
<td style="background-image: url(ContentBackground.jpg);
vertical-align: top; background-repeat: repeat-y; height: 488px;">
<br />
<asp:LinkButton ID="lnkRequest" runat="server"
PostBackUrl="SendMail.aspx">Request</asp:LinkButtonmore information
</td>
</tr>
</table>
</div>
</form>
</body>

"Cowboy (Gregory A. Beamer)" wrote:
Set up the table itself to 100% and then constrain the portions that are a
set size. That should solve this problem.

Once again, the basic HTML quesitons can be answered better in groups like
the FrontPage and Expressions groups. While the do not deal with
MasterPages, these types of issues are common to all HTML pages.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
"pagates" <pa*****@discussions.microsoft.comwrote in message
news:C4**********************************@microsof t.com...
Hi All,

Newbie here again.

I have a master page setup that is a two-column table. The left is a
table
of contents, the right the target. I want the left column to always take
up
100% of the height of the browser (or, to put it another way, I want the
content to take up 100% of the right column if it is smaller than the
height). Is there a way to do that?

Setting the height property or style to 100% doesn't do it - it only
resizes
to 100% of the content of the cell.

Also, I'd like to resize the cells to take up 100% of the height if the
window is resized.

Thanks,
pagates


Sep 15 '06 #3
this has to be done with client script, as using height=100% requires the
object be contained by an object of know size. body does not have a fixed
height.

-- bruce (sqlwork.com)
"pagates" <pa*****@discussions.microsoft.comwrote in message
news:C4**********************************@microsof t.com...
Hi All,

Newbie here again.

I have a master page setup that is a two-column table. The left is a
table
of contents, the right the target. I want the left column to always take
up
100% of the height of the browser (or, to put it another way, I want the
content to take up 100% of the right column if it is smaller than the
height). Is there a way to do that?

Setting the height property or style to 100% doesn't do it - it only
resizes
to 100% of the content of the cell.

Also, I'd like to resize the cells to take up 100% of the height if the
window is resized.

Thanks,
pagates

Sep 15 '06 #4
I found the issue: the automatically generated code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

prevents the table from opening up to 100%.

Not sure what to do about it - I guess (as you said) I'll need to attempt to
manipulate it with JavaScript.

Thanks,
PAGates
"bruce barker (sqlwork.com)" wrote:
this has to be done with client script, as using height=100% requires the
object be contained by an object of know size. body does not have a fixed
height.

-- bruce (sqlwork.com)
"pagates" <pa*****@discussions.microsoft.comwrote in message
news:C4**********************************@microsof t.com...
Hi All,

Newbie here again.

I have a master page setup that is a two-column table. The left is a
table
of contents, the right the target. I want the left column to always take
up
100% of the height of the browser (or, to put it another way, I want the
content to take up 100% of the right column if it is smaller than the
height). Is there a way to do that?

Setting the height property or style to 100% doesn't do it - it only
resizes
to 100% of the content of the cell.

Also, I'd like to resize the cells to take up 100% of the height if the
window is resized.

Thanks,
pagates


Sep 15 '06 #5
Hi All,

Stuck Again.

I can create JavaScript and register it with
Page.ClientScript.RegisterStartupScript(...). I'm having a problem finding
the correct DOM object to capture when the window resizes. My resize event
handler always gets called once on load, and then it either never gets called
again, or I get an "htmlfile not implemented" error. Could somebody please
knock some sense into me (and/or point me to an example)?

I've tried (among other things):
onresize = ResizeFunction( );
document.onresize = ResizeFunction( );
window.onresize = ResizeFunction( );

Thanks,
pagates

"bruce barker (sqlwork.com)" wrote:
this has to be done with client script, as using height=100% requires the
object be contained by an object of know size. body does not have a fixed
height.

-- bruce (sqlwork.com)
"pagates" <pa*****@discussions.microsoft.comwrote in message
news:C4**********************************@microsof t.com...
Hi All,

Newbie here again.

I have a master page setup that is a two-column table. The left is a
table
of contents, the right the target. I want the left column to always take
up
100% of the height of the browser (or, to put it another way, I want the
content to take up 100% of the right column if it is smaller than the
height). Is there a way to do that?

Setting the height property or style to 100% doesn't do it - it only
resizes
to 100% of the content of the cell.

Also, I'd like to resize the cells to take up 100% of the height if the
window is resized.

Thanks,
pagates


Sep 15 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Michael Herman \(Parallelspace\) | last post: by
2 posts views Thread by Jon Spivey | last post: by
17 posts views Thread by Rob R. Ainscough | last post: by
1 post views Thread by Roland Dick | last post: by
1 post views Thread by Mike Collins | last post: by
6 posts views Thread by =?Utf-8?B?SmF5IFBvbmR5?= | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.