HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Need table to stay a certain height
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Table
View previous topic :: View next topic  
Author Message
arewethereyet



Joined: 11 Dec 2007
Posts: 5

PostPosted: Tue Dec 11, 2007 10:29 am     Need table to stay a certain height Reply with quote

How do you "fix" the size of the screen display? I don't have a problem with the width, but I need the height to always appear the same height, no matter if you have enough text entered to force it to that height, or even if no text entered. I need it to be about 750 px tall. Here's my code (don't laugh):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<title>Requirements, Modernization & Integration (RMI): Orientation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="RMI_Orientation.css" rel="stylesheet" type="text/css">
<script language="JavaScript1.2">
function openWin(url, name)
{
popWin = window.open(url, name, 'directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,alwaysRaised=yes,dependent);
}
function popToFront()
{
popWin.focus()
}
</script>
<style type="text/css">
<!--
.bordertop {
border-top: solid #333366;
border-right: none;
border-bottom: none;
border-left: none;
}
.borderleft {
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: solid;
}
.borderright {
border-top-style: none;
border-right-style: solid;
border-bottom-style: none;
border-left-style: none;
border-top-color: #333366;
border-right-color: #333366;
border-bottom-color: #333366;
border-left-color: #333366;
}
.textbackground {
background-image: url(../Graphics/TextBackground_c.jpg);
background-repeat: no-repeat;
font-family: Arial, Helvetica, sans-serif;
font-size: 11pt;
}
.margin-left {
text-indent: 10px;
padding-left: 0px;
text-indent: 10px;
left: 0px;
}
ul
{
list-style-image: url('bullet.png');
font-family: Arial, Helvetica, sans-serif;
font-size: 11pt;
}

.indented
{
padding-left: 10pt;
}

.rightalign {
text-align:right;
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
font-weight: bold;
color: #333366;
}

-->
</style>
</HEAD>

<BODY class="pagesetup">
<table border="0" cellspacing="0" cellpadding="0">
<tr><td colspan="2"><img src="../Graphics/TitleMasterBackground_Banner_a.png" alt="Banner"></td>
</tr>
</table>
<table width="90%" cellpadding="0" cellspacing="0"><tr><td><p class="rightalign">Comments / Feedback&nbsp;&nbsp;&nbsp;</td></tr></table>

<table width="90%" class="bordertop" cellpadding="0" cellspacing="0">
<tr>
<td width="20%" rowspan="2" valign="top" class="borderright"><br><p class="indented"><span class="menu">Who Are We?</span></span>
<p class="indented"><span class="menu">What We Do?</span></span>
<p class="indented"><span class="menu">Latest News</span></span>
<p class="indented"><span class="menu">Free Resources</span></span>
<p class="indented"><span class="menu">Testimonials</span></span>
<p class="indented"><span class="menu">Links</span></span></p></p></td>

<td width="75%" valign="top">&nbsp;&nbsp;<span class="TitlePage">The RMI Story</span><p><p></td>
</tr>
<tr valign="top">
<td width="75%"><ul><li>Opening/teaser (attention grabber: one idea is to show a brief 30-second video of random people being asked what is RMI)<br>

<li>Video (NNSA endorsement messages: NNSA upper management would be videotaped delivering a Communications Subteam scripted endorsement message)<br>
<li>What the RMI Project is and how it came to be (slides)<br>
<li>How it is supporting Complex Transformation (slide)<br>
<li>Key transformational impacts (slide)<br>
<li>How transformational impacts will affect the work of the Complex (slide)<br>
<li>How it is supporting Complex Transformation (slide)<br>
<li>Key transformational impacts (slide)<br>
<li>How transformational impacts will affect the work of the Complex (slide)</ul></TD>
</tr>
</table></table>
</BODY>
</HTML>
sticks464



Joined: 31 Dec 2006
Posts: 993

PostPosted: Tue Dec 11, 2007 3:42 pm     Reply with quote

Put a wrapper div around the content and set it for a specific height
Code:
#wrapper{
height:350px;
}
arewethereyet



Joined: 11 Dec 2007
Posts: 5

PostPosted: Wed Dec 12, 2007 7:59 am     Reply with quote

So your example goes in the head code, but what code do I use in the body? Sorry, I need a more detailed example.
sticks464



Joined: 31 Dec 2006
Posts: 993

PostPosted: Wed Dec 12, 2007 8:19 am     Reply with quote

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<title>Requirements, Modernization & Integration (RMI): Orientation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="RMI_Orientation.css" rel="stylesheet" type="text/css">
<script language="JavaScript1.2">
function openWin(url, name)
{
popWin = window.open(url, name, 'directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,alwaysRaised=yes,dependent);
}
function popToFront()
{
popWin.focus()
}
</script>
<style type="text/css">
<!--
#wrapper{
height:350px;
}
.bordertop {
border-top: solid #333366;
border-right: none;
border-bottom: none;
border-left: none;
}
.borderleft {
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: solid;
}
.borderright {
border-top-style: none;
border-right-style: solid;
border-bottom-style: none;
border-left-style: none;
border-top-color: #333366;
border-right-color: #333366;
border-bottom-color: #333366;
border-left-color: #333366;
}
.textbackground {
background-image: url(../Graphics/TextBackground_c.jpg);
background-repeat: no-repeat;
font-family: Arial, Helvetica, sans-serif;
font-size: 11pt;
}
.margin-left {
text-indent: 10px;
padding-left: 0px;
text-indent: 10px;
left: 0px;
}
ul
{
list-style-image: url('bullet.png');
font-family: Arial, Helvetica, sans-serif;
font-size: 11pt;
}

.indented
{
padding-left: 10pt;
}

.rightalign {
text-align:right;
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
font-weight: bold;
color: #333366;
}

-->
</style>
</HEAD>

<BODY class="pagesetup">
<div id="wrapper">
<table border="0" cellspacing="0" cellpadding="0">
<tr><td colspan="2"><img src="../Graphics/TitleMasterBackground_Banner_a.png" alt="Banner"></td>
</tr>
</table>
<table width="90%" cellpadding="0" cellspacing="0"><tr><td><p class="rightalign">Comments / Feedback&nbsp;&nbsp;&nbsp;</td></tr></table>

<table width="90%" class="bordertop" cellpadding="0" cellspacing="0">
<tr>
<td width="20%" rowspan="2" valign="top" class="borderright"><br><p class="indented"><span class="menu">Who Are We?</span></span>
<p class="indented"><span class="menu">What We Do?</span></span>
<p class="indented"><span class="menu">Latest News</span></span>
<p class="indented"><span class="menu">Free Resources</span></span>
<p class="indented"><span class="menu">Testimonials</span></span>
<p class="indented"><span class="menu">Links</span></span></p></p></td>

<td width="75%" valign="top">&nbsp;&nbsp;<span class="TitlePage">The RMI Story</span><p><p></td>
</tr>
<tr valign="top">
<td width="75%"><ul><li>Opening/teaser (attention grabber: one idea is to show a brief 30-second video of random people being asked what is RMI)<br>

<li>Video (NNSA endorsement messages: NNSA upper management would be videotaped delivering a Communications Subteam scripted endorsement message)<br>
<li>What the RMI Project is and how it came to be (slides)<br>
<li>How it is supporting Complex Transformation (slide)<br>
<li>Key transformational impacts (slide)<br>
<li>How transformational impacts will affect the work of the Complex (slide)<br>
<li>How it is supporting Complex Transformation (slide)<br>
<li>Key transformational impacts (slide)<br>
<li>How transformational impacts will affect the work of the Complex (slide)</ul></TD>
</tr>
</table></table>
</div>
</BODY>
</HTML>
arewethereyet



Joined: 11 Dec 2007
Posts: 5

PostPosted: Wed Dec 12, 2007 10:08 am     Reply with quote

Unfortunately, it is still not fixing the height. I can go into the bottom of the table and enter random text and line breaks and the page just continues on down the screen like there was no height set.

But, hey, thanks for your help!
sticks464



Joined: 31 Dec 2006
Posts: 993

PostPosted: Wed Dec 12, 2007 2:03 pm     Reply with quote

Add this to the wrapper style
Code:
overflow:hidden;

so it looks like this
Code:
#wrapper{
height:350px;
overflow:hidden;
}

This will put a scrollbar on the right if the content exceeds the height.
arewethereyet



Joined: 11 Dec 2007
Posts: 5

PostPosted: Fri Dec 14, 2007 7:59 am     Reply with quote

Sorry for the delay in getting back to you (2-day meeting). Hey, this is too cool! Works great in all browsers.

Thanks for your help!
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Table All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial