473,786 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can I force the form to extend to 90% of the body height?

<body runat="server" id="MainBody">

<form id="form1" runat="server" style="backgrou nd-color:green; width: 100%;
height: 100%">

<br />

Table1" runat="server" Style="backgrou nd-color:Yellow; width: 100%; height:
90%" BorderColor="Ma roon"

BorderWidth="9p x" BorderStyle="Ri dge">

The body fills the IE window with it's color.

A little green shows at the top (because of the <br/>)

I also placed a <br/after the bottom of the table and a little green show
there.

The yellow table fills the table between those two green areas.

The form's width does fill 100% of the body.

The two green areas show where the form is and the form does not cover 90%
of the body height!

That's my problem.

Can I force the form to extend to 90% of the body height some how?

Thanks






Oct 23 '08 #1
4 2485
First of all, using <br/tags to add space above and below elements is very
bad practice, since different browsers display them differently (sometimes
different sizes, etc.). I would suggest that you use CSS margins instead.
But I am also noticing that you have the height for your form set to 100%,
not 90%. If you are expecting the form to take up 90% because of the 90% in
the table, that will not work. When you use percentages for height and
width, it is that percentage of the container. So your form will take up the
entire height (except for the space from your <br/tags) of the body, and
the table will take up 90% of the form. I would suggest the following:

<body runat="server" id="MainBody">
<form id="form1" runat="server" style="backgrou nd-color:green; width:
100%; height: 90%; margin-top:10px;margin-bottom:10px;">
<asp:Table id="Table1" runat="server" Style="backgrou nd-color:Yellow;
width: 100%; height: 100%; border:Maroon 9px Ridge;">

I have never been a fan of using percentages, but I'm also not a designer,
but I'm sure you know about some of the weird things browsers sometimes do
when rendering tables (they don't always like to cooperate with us as far as
heights and widths). Another thing you can try is to actually make the
height for both the form and table 100%, and since you are now specifying
margin-top and margin-bottom, you don't need to make the height any less
than 100%. Try some of this stuff, but the two key things I've mentioned
that you should take into account is how a height is calculated when a
percentage is used, and to use margins rather than <br/tags. Good Luck!
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"AAaron123" <aa*******@road runner.comwrote in message
news:e$******** ******@TK2MSFTN GP05.phx.gbl...
<body runat="server" id="MainBody">

<form id="form1" runat="server" style="backgrou nd-color:green; width:
100%; height: 100%">

<br />

Table1" runat="server" Style="backgrou nd-color:Yellow; width: 100%;
height: 90%" BorderColor="Ma roon"

BorderWidth="9p x" BorderStyle="Ri dge">

The body fills the IE window with it's color.

A little green shows at the top (because of the <br/>)

I also placed a <br/after the bottom of the table and a little green
show there.

The yellow table fills the table between those two green areas.

The form's width does fill 100% of the body.

The two green areas show where the form is and the form does not cover 90%
of the body height!

That's my problem.

Can I force the form to extend to 90% of the body height some how?

Thanks






Oct 23 '08 #2

"Nathan Sokalski" <nj********@hot mail.comwrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
First of all, using <br/tags to add space above and below elements is
very bad practice, since different browsers display them differently
(sometimes different sizes, etc.). I would suggest that you use CSS
margins instead. But I am also noticing that you have the height for your
form set to 100%, not 90%. If you are expecting the form to take up 90%
because of the 90% in the table, that will not work. When you use
percentages for height and width, it is that percentage of the container.
So your form will take up the entire height (except for the space from
your <br/tags) of the body, and the table will take up 90% of the form.
I would suggest the following:
Some switch in my head flipped and I wrote that I expected the form to be
90% instead of expecting the Table to be 90%.

I only used the <br/so that I could see the form's color.

Using your suggestion to use margins I used the following:
<body runat="server" id="Body1">

<form id="form2" runat="server" style="backgrou nd-color:green; width:100%;

height: 100%; margin-top:20px; margin-bottom:20px;">

<asp:Table id="Table2" runat="server" Style="backgrou nd-color:Yellow;

width: 100%; height: 90%; border:Maroon 9px
Ridge;margin-top:20px;margin-bottom:20px;">
I should say that this is a .master

If the content forms are small the table scrinks to fit and the form follows
suit leaving a bottom margin much larger than 20px.

If I don't use percentage I may pick a too small height for the content it
will cause my display to not use all of the availabe browser height and use
scroll bars when it did not have to. I'd have the same effect I just
described. If I pick a too large height I'll have scroll bars that scroll to
the unused area at the bottom.

Isn't that correct?

The fact that the content forms vary in height and I'd like the display to
adapt to them is the root of the problem.
I remove the two heights and it work the same. The bottom of the table moves
as I menu to different content but it looks OK.

Without percentages how would you do it?

Thanks

>
<body runat="server" id="MainBody">
<form id="form1" runat="server" style="backgrou nd-color:green; width:
100%; height: 90%; margin-top:10px;margin-bottom:10px;">
<asp:Table id="Table1" runat="server" Style="backgrou nd-color:Yellow;
width: 100%; height: 100%; border:Maroon 9px Ridge;">

I have never been a fan of using percentages, but I'm also not a designer,
but I'm sure you know about some of the weird things browsers sometimes do
when rendering tables (they don't always like to cooperate with us as far
as heights and widths). Another thing you can try is to actually make the
height for both the form and table 100%, and since you are now specifying
margin-top and margin-bottom, you don't need to make the height any less
than 100%. Try some of this stuff, but the two key things I've mentioned
that you should take into account is how a height is calculated when a
percentage is used, and to use margins rather than <br/tags. Good Luck!
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"AAaron123" <aa*******@road runner.comwrote in message
news:e$******** ******@TK2MSFTN GP05.phx.gbl...
><body runat="server" id="MainBody">

<form id="form1" runat="server" style="backgrou nd-color:green; width:
100%; height: 100%">

<br />

Table1" runat="server" Style="backgrou nd-color:Yellow; width: 100%;
height: 90%" BorderColor="Ma roon"

BorderWidth="9 px" BorderStyle="Ri dge">

The body fills the IE window with it's color.

A little green shows at the top (because of the <br/>)

I also placed a <br/after the bottom of the table and a little green
show there.

The yellow table fills the table between those two green areas.

The form's width does fill 100% of the body.

The two green areas show where the form is and the form does not cover
90% of the body height!

That's my problem.

Can I force the form to extend to 90% of the body height some how?

Thanks







Oct 23 '08 #3
the width and height set the size of the content area of a block element.
(inline element the values are ignored). if the value is specified as a
percent, then its a pecent of its parent's content area. note, margin, border
and scrollbars are outside the width. if the parent does not have an explicit
size, then the value is ignored.

try the following:

<html>
<body>
<div style="width:10 0%;height:100%; background-color:blue;" ></div>
<div style="width:10 0%;height:100%; background-color:yellow;" ></div>
</body>
</html>

you will see two boxes. each silghtly smaller than the screen size because
body has a margin by default.

-- bruce (sqlwork.com)
"AAaron123" wrote:
>
"Nathan Sokalski" <nj********@hot mail.comwrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
First of all, using <br/tags to add space above and below elements is
very bad practice, since different browsers display them differently
(sometimes different sizes, etc.). I would suggest that you use CSS
margins instead. But I am also noticing that you have the height for your
form set to 100%, not 90%. If you are expecting the form to take up 90%
because of the 90% in the table, that will not work. When you use
percentages for height and width, it is that percentage of the container.
So your form will take up the entire height (except for the space from
your <br/tags) of the body, and the table will take up 90% of the form.
I would suggest the following:

Some switch in my head flipped and I wrote that I expected the form to be
90% instead of expecting the Table to be 90%.

I only used the <br/so that I could see the form's color.

Using your suggestion to use margins I used the following:
<body runat="server" id="Body1">

<form id="form2" runat="server" style="backgrou nd-color:green; width:100%;

height: 100%; margin-top:20px; margin-bottom:20px;">

<asp:Table id="Table2" runat="server" Style="backgrou nd-color:Yellow;

width: 100%; height: 90%; border:Maroon 9px
Ridge;margin-top:20px;margin-bottom:20px;">
I should say that this is a .master

If the content forms are small the table scrinks to fit and the form follows
suit leaving a bottom margin much larger than 20px.

If I don't use percentage I may pick a too small height for the content it
will cause my display to not use all of the availabe browser height and use
scroll bars when it did not have to. I'd have the same effect I just
described. If I pick a too large height I'll have scroll bars that scroll to
the unused area at the bottom.

Isn't that correct?

The fact that the content forms vary in height and I'd like the display to
adapt to them is the root of the problem.
I remove the two heights and it work the same. The bottom of the table moves
as I menu to different content but it looks OK.

Without percentages how would you do it?

Thanks


<body runat="server" id="MainBody">
<form id="form1" runat="server" style="backgrou nd-color:green; width:
100%; height: 90%; margin-top:10px;margin-bottom:10px;">
<asp:Table id="Table1" runat="server" Style="backgrou nd-color:Yellow;
width: 100%; height: 100%; border:Maroon 9px Ridge;">

I have never been a fan of using percentages, but I'm also not a designer,
but I'm sure you know about some of the weird things browsers sometimes do
when rendering tables (they don't always like to cooperate with us as far
as heights and widths). Another thing you can try is to actually make the
height for both the form and table 100%, and since you are now specifying
margin-top and margin-bottom, you don't need to make the height any less
than 100%. Try some of this stuff, but the two key things I've mentioned
that you should take into account is how a height is calculated when a
percentage is used, and to use margins rather than <br/tags. Good Luck!
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"AAaron123" <aa*******@road runner.comwrote in message
news:e$******** ******@TK2MSFTN GP05.phx.gbl...
<body runat="server" id="MainBody">

<form id="form1" runat="server" style="backgrou nd-color:green; width:
100%; height: 100%">

<br />

Table1" runat="server" Style="backgrou nd-color:Yellow; width: 100%;
height: 90%" BorderColor="Ma roon"

BorderWidth="9p x" BorderStyle="Ri dge">

The body fills the IE window with it's color.

A little green shows at the top (because of the <br/>)

I also placed a <br/after the bottom of the table and a little green
show there.

The yellow table fills the table between those two green areas.

The form's width does fill 100% of the body.

The two green areas show where the form is and the form does not cover
90% of the body height!

That's my problem.

Can I force the form to extend to 90% of the body height some how?

Thanks







Oct 23 '08 #4

"bruce barker" <br*********@di scussions.micro soft.comwrote in message
news:FE******** *************** ***********@mic rosoft.com...
the width and height set the size of the content area of a block element.
(inline element the values are ignored). if the value is specified as a
percent, then its a pecent of its parent's content area. note, margin,
border
and scrollbars are outside the width. if the parent does not have an
explicit
size, then the value is ignored.
In my situation the tables parent, the form, had 100% which does not count
as an explicit size, so the table's 90% size was ignored. Right?

Maybe I should have stared with what I wanted to do.

My content pages each contains a div element containing html text.
Sometime a little and sometime a lot.
These end up oneat a time in one of the .master's table cells.
I'd like the content area to be a large as possible so if there is much text
and it could all fit on the screen it is not cramed into a small area with
scroll bars.
However, I don't want to explicitly make the area large because when there
is little text there will be scroll bars that scroll into black area.

Thanks for the info
>
try the following:

<html>
<body>
<div style="width:10 0%;height:100%; background-color:blue;" ></div>
<div style="width:10 0%;height:100%; background-color:yellow;" ></div>
</body>
</html>

you will see two boxes. each silghtly smaller than the screen size because
body has a margin by default.

-- bruce (sqlwork.com)
"AAaron123" wrote:
>>
"Nathan Sokalski" <nj********@hot mail.comwrote in message
news:%2******* *********@TK2MS FTNGP06.phx.gbl ...
First of all, using <br/tags to add space above and below elements is
very bad practice, since different browsers display them differently
(sometimes different sizes, etc.). I would suggest that you use CSS
margins instead. But I am also noticing that you have the height for
your
form set to 100%, not 90%. If you are expecting the form to take up 90%
because of the 90% in the table, that will not work. When you use
percentages for height and width, it is that percentage of the
container.
So your form will take up the entire height (except for the space from
your <br/tags) of the body, and the table will take up 90% of the
form.
I would suggest the following:

Some switch in my head flipped and I wrote that I expected the form to be
90% instead of expecting the Table to be 90%.

I only used the <br/so that I could see the form's color.

Using your suggestion to use margins I used the following:
<body runat="server" id="Body1">

<form id="form2" runat="server" style="backgrou nd-color:green;
width:100%;

height: 100%; margin-top:20px; margin-bottom:20px;">

<asp:Table id="Table2" runat="server" Style="backgrou nd-color:Yellow;

width: 100%; height: 90%; border:Maroon 9px
Ridge;margin-top:20px;margin-bottom:20px;">
I should say that this is a .master

If the content forms are small the table scrinks to fit and the form
follows
suit leaving a bottom margin much larger than 20px.

If I don't use percentage I may pick a too small height for the content
it
will cause my display to not use all of the availabe browser height and
use
scroll bars when it did not have to. I'd have the same effect I just
described. If I pick a too large height I'll have scroll bars that scroll
to
the unused area at the bottom.

Isn't that correct?

The fact that the content forms vary in height and I'd like the display
to
adapt to them is the root of the problem.
I remove the two heights and it work the same. The bottom of the table
moves
as I menu to different content but it looks OK.

Without percentages how would you do it?

Thanks

>
<body runat="server" id="MainBody">
<form id="form1" runat="server" style="backgrou nd-color:green; width:
100%; height: 90%; margin-top:10px;margin-bottom:10px;">
<asp:Table id="Table1" runat="server"
Style="backgrou nd-color:Yellow;
width: 100%; height: 100%; border:Maroon 9px Ridge;">

I have never been a fan of using percentages, but I'm also not a
designer,
but I'm sure you know about some of the weird things browsers sometimes
do
when rendering tables (they don't always like to cooperate with us as
far
as heights and widths). Another thing you can try is to actually make
the
height for both the form and table 100%, and since you are now
specifying
margin-top and margin-bottom, you don't need to make the height any
less
than 100%. Try some of this stuff, but the two key things I've
mentioned
that you should take into account is how a height is calculated when a
percentage is used, and to use margins rather than <br/tags. Good
Luck!
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"AAaron123" <aa*******@road runner.comwrote in message
news:e$******** ******@TK2MSFTN GP05.phx.gbl...
<body runat="server" id="MainBody">

<form id="form1" runat="server" style="backgrou nd-color:green; width:
100%; height: 100%">

<br />

Table1" runat="server" Style="backgrou nd-color:Yellow; width: 100%;
height: 90%" BorderColor="Ma roon"

BorderWidth="9 px" BorderStyle="Ri dge">

The body fills the IE window with it's color.

A little green shows at the top (because of the <br/>)

I also placed a <br/after the bottom of the table and a little
green
show there.

The yellow table fills the table between those two green areas.

The form's width does fill 100% of the body.

The two green areas show where the form is and the form does not cover
90% of the body height!

That's my problem.

Can I force the form to extend to 90% of the body height some how?

Thanks








Oct 23 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4453
by: Nomen Nescio | last post by:
can anyone be so kind as to look at http://www.mysolution.ws/HYPOCRITE.php and let me know why it isn't passing the form data to http://www.mysolution.ws/insertHYPOCRITES.php for the most part, the scripts were created with http://phpcodegenie.sourceforge.net/
7
3615
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title> </head> <style type="text/css">
1
3772
by: IkBenHet | last post by:
Hello, I found this script to create a simple rich text form (http://programmabilities.com/xml/index.php?id=17): <html> <head> <title>Rich Text Editor</title> </head> <body>
2
2277
by: Clay Harryman | last post by:
I've found a script that will force-load index.html. It is below: (thanks to the authors!) <!-- Hide script from old browsers // This script copyright 1997, Tom Negrino and Dori Smith. // This script is from "JavaScript for the WWW, Visual QuickStart Guide, 2nd Ed." // For more information, see <http://www.chalcedony.com/java script/>. // This script may be used and modified, but the copyright notice
4
2455
by: Tomasz Bak | last post by:
Hello, I have a simple problem: mark a list of defects on an image. I think the best way to do it is to select a single deffect, then take two coordinates of coursor form an image on a web page (first when user press the button, and the second when he releases it). Those two points are going to be send to the web application (i.e. with AJAX) and saved in a database.
1
3511
by: Sithlord999 | last post by:
Hello. I'm working on an email form on Dreamweaver and I'm looking for a PHP code to make it work. The form with some required fields would send the submitted information and two image attachments to my email address. I just started looking at PHP two weeks ago for an answer and the only code that worked for me, so far, was a simple php email form: <html> <head></head> <body> <? if(isset($submit)) { //check for email injection attack;...
12
4682
by: daniel2335 | last post by:
This problem is everywhere! I have read all forums available, spent about 40+ hours on it and lost a bit of hair. I was going to explain what its ment to look like but I just realised removing the DocType makes it look like how I want it (with the div containing the ">" symbol the full length). But obviously I want this look with the DocType still on. HTML <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" ...
6
6141
by: ryanmhuc | last post by:
Is there a way with javascript to force firefox on a page to display the scrollbar even when the content does not extend outside the viewable error? Going from page to page where the scroll bar displays and then doesn't display causes the page to visually jump when the scroll bar is shown then hidden.
3
4309
by: blackrunner | last post by:
ERROR in my Query?! ERROR: Element GESCHLECHT is undefined in FORM. i think everything ok. Maby somebody can help me here Element GESCHLECHT is undefined in FORM. The error occurred in \anmeldung2.cfm: line 404
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10108
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9960
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.