473,322 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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 8389
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the...
2
by: Jon Spivey | last post by:
Hi, Using VS 2005/VB.net. I need to add a meta description tag and change a stylesheet link from a page based on a master page. Found this article...
3
by: ivanpais | last post by:
Hi, I have a Web User Control, Lets say "Foo.ascx", that contains a button "btnFoo". I have a Master Page "Bar.master", that has a label "lblBar". This label is exposed by a public property...
17
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content...
1
by: Roland Dick | last post by:
Hello, I have a problem here with an ASP.NET website. The pages are supposed to use a single master page which just contains some images and a menu control on the top, below that is the content...
1
by: Mike Collins | last post by:
I am trying to create some pages and have them take 100% of the window, but I cannot get 100% to work. If I set the height of my div, the page displays a scroll bar and it looks like I set the...
14
by: rsearing | last post by:
I am new to HTML and will have to beg if this is obvious, but I am trying to design a table that looks like: ******************************** *----A------*------------------------*...
6
by: =?Utf-8?B?SmF5IFBvbmR5?= | last post by:
I am trying to access a Public property on a Master Page from a Base Page. On the content pages I have the MasterType Directive set up as follows: <%@ MasterType virtualpath="~/Master.master" %>...
4
by: AAaron123 | last post by:
<body runat="server" id="MainBody"> <form id="form1" runat="server" style="background-color:green; width: 100%; height: 100%"> <br /> Table1" runat="server" Style="background-color:Yellow;...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.