Jump to content

force table to take up entire screen?


efficacious

Recommended Posts

hello everyone,

 

does anyone know of a way to FORCE a table to take up the entire screen?

 

I've obviously tried using width=100% but this is giving weired results..

 

Bascially I have a table that needs to be stretched across the entire screen of the user then a div is nested inside of that and is located in the dead center of the screen.

 

The problem I'm having is that the table will not take up the whole screen.. I either have to specify a height or a width .. it won't let me use just 100%..

 

here is he source code for it..:

<link rel="stylesheet" type="text/css" href="schedule.css" />
<script type="text/javascript">

function openday(x)
{
document.getElementById('HDay').value=x;
document.getElementById('Hform').submit();
}
</script>

</head>
<body>

<!-- HIDDEN FORM //-->
<form action='schedule.php' method='post' name='Hform'>
<input type='hidden' name='HDay' value='' />
</form>
<!-- HIDDEN FORM //-->

<div id='container'>

<!-- BRING IN Gblz //-->
<style type='text/css'>#Sep22008{background-color:navy;background-image:url('imgs/cell4.png');}#Sep22008:hover{background-image:url('imgs/cell5.png');}#Sep22008.hover{background-image:url('imgs/cell5.png');}</style>

<!-- BRING IN Dsel //-->

	<table id='Popper'>
		<tr>
			<td>
				<div id='PopDay'>
					<h1>Sep242008</h1>
				</div>
			</td>
		</tr>	
	</table>


<!-- LOGIN //-->
<div id="LoginBox">
<br />
<a title="Login" href="login/login.php"><img alt="" onmouseout="this.src='imgs/Login-1.png'" onmouseover="this.src='imgs/Login-2.png'" src="imgs/Login-1.png" /></a></div>

<!-- MENU //-->

<!-- START CALENDAR //-->
<br />
<div id="CalDiv">
<div id='Tc'>

<table id='Tc'>
	<tr>
		<td>
		<br />
			<form action='schedule.php' method='get'>
<input title='Search M/D/Y' type='submit' value='Search' />  <select title="Search M/D/Y" name="month"><option value="0">January</option>
<option value="1">February</option>
<option value="2">March</option>
<option value="3">April</option>
<option value="4">May</option>
<option value="5">June</option>
<option value="6">July</option>
<option value="7">August</option>
<option value="8" selected="selected">September</option>
<option value="9">October</option>
<option value="10">November</option>
<option value="11">December</option>
</select>  <select title="Search M/D/Y" name="day"><option value="day">Day</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>  <input title='Search M/D/Y' onclick='this.select();' value='Year' minlength='4' maxlength='4' size='5' type='text' name='year' />
</form>			</td>
	</tr>
</table>
</div>
<table id='dayTable' cellspacing='0' cellpadding='0'>
<tr>
	<td colspan='2'>
	<form action="schedule.php" method="get">
<font color="#FFFFFF">Quick Select:</font> <select title="Quick Select Month" name="month" onchange="this.form.submit()"><option value="0">January</option>
<option value="1">February</option>
<option value="2">March</option>
<option value="3">April</option>
<option value="4">May</option>
<option value="5">June</option>
<option value="6">July</option>
<option value="7">August</option>
<option value="8" selected="selected">September</option>
<option value="9">October</option>
<option value="10">November</option>
<option value="11">December</option>
</select><input name="year" type="hidden" value="2008" /></form>		</td>
	<td style='text-align:center;' colspan='3'>
	<h1 style="color:white;text-decoration:underline;">
	September 2008		</h1>
	</td>
	<td colspan='2'>
		<!-- MONTH/DAYs SWITCHER HTML //-->
		<a title='Click here to go to today.' href='?month=8&year=2008'><font color='#ffffff'>Today is 9-2-2008</font></a><br /><br /><a href='?month=7&year=2008'><img id='prev' onmouseout='this.src="imgs/prev.png"' onmouseover='this.src="imgs/prev2.png"' title='Previous Month' src='imgs/prev.png' /></a>			    
		<a href='?month=9&year=2008'><img id='next' onmouseout='this.src="imgs/next.png"' onmouseover='this.src="imgs/next2.png"' title='Next Month' src='imgs/next.png' /></a>		</td>
</tr>
<tr>
<td class='Dnames'><center>Sunday</center></td><td class='Dnames'><center>Monday</center></td><td class='Dnames'><center>Tuesday</center></td><td class='Dnames'><center>Wensday</center></td><td class='Dnames'><center>Thursday</center></td><td class='Dnames'><center>Friday</center></td><td class='Dnames'><center>Saturday</center></td>

</tr>
<tr>


<td><div class='NoDay' ></div></td>

<td><div class='Daybox' id='Sep12008' onclick='openday("Sep12008");'>1</div></td>

<td><div class='Daybox' id='Sep22008' onclick='openday("Sep22008");'>2</div></td>

<td><div class='Daybox' id='Sep32008' onclick='openday("Sep32008");'>3</div></td>

<td><div class='Daybox' id='Sep42008' onclick='openday("Sep42008");'>4</div></td>

<td><div class='Daybox' id='Sep52008' onclick='openday("Sep52008");'>5</div></td>

<td><div class='Daybox' id='Sep62008' onclick='openday("Sep62008");'>6</div></td>

</tr>
<tr>

<td><div class='Daybox' id='Sep72008' onclick='openday("Sep72008");'>7</div></td>

<td><div class='Daybox' id='Sep82008' onclick='openday("Sep82008");'>8</div></td>

<td><div class='Daybox' id='Sep92008' onclick='openday("Sep92008");'>9</div></td>

<td><div class='Daybox' id='Sep102008' onclick='openday("Sep102008");'>10</div></td>

<td><div class='Daybox' id='Sep112008' onclick='openday("Sep112008");'>11</div></td>

<td><div class='Daybox' id='Sep122008' onclick='openday("Sep122008");'>12</div></td>

<td><div class='Daybox' id='Sep132008' onclick='openday("Sep132008");'>13</div></td>

</tr>
<tr>

<td><div class='Daybox' id='Sep142008' onclick='openday("Sep142008");'>14</div></td>

<td><div class='Daybox' id='Sep152008' onclick='openday("Sep152008");'>15</div></td>

<td><div class='Daybox' id='Sep162008' onclick='openday("Sep162008");'>16</div></td>

<td><div class='Daybox' id='Sep172008' onclick='openday("Sep172008");'>17</div></td>

<td><div class='Daybox' id='Sep182008' onclick='openday("Sep182008");'>18</div></td>

<td><div class='Daybox' id='Sep192008' onclick='openday("Sep192008");'>19</div></td>

<td><div class='Daybox' id='Sep202008' onclick='openday("Sep202008");'>20</div></td>

</tr>
<tr>

<td><div class='Daybox' id='Sep212008' onclick='openday("Sep212008");'>21</div></td>

<td><div class='Daybox' id='Sep222008' onclick='openday("Sep222008");'>22</div></td>

<td><div class='Daybox' id='Sep232008' onclick='openday("Sep232008");'>23</div></td>

<td><div class='Daybox' id='Sep242008' onclick='openday("Sep242008");'>24</div></td>

<td><div class='Daybox' id='Sep252008' onclick='openday("Sep252008");'>25</div></td>

<td><div class='Daybox' id='Sep262008' onclick='openday("Sep262008");'>26</div></td>

<td><div class='Daybox' id='Sep272008' onclick='openday("Sep272008");'>27</div></td>

</tr>
<tr>

<td><div class='Daybox' id='Sep282008' onclick='openday("Sep282008");'>28</div></td>

<td><div class='Daybox' id='Sep292008' onclick='openday("Sep292008");'>29</div></td>

<td><div class='Daybox' id='Sep302008' onclick='openday("Sep302008");'>30</div></td>

<td><div class='NoDay' ></div></td>

<td><div class='NoDay' ></div></td>

<td><div class='NoDay' ></div></td>

<td><div class='NoDay' ></div></td>

</tr>
<tr>

<td><div class='NoDay' ></div></td>

<td><div class='NoDay' ></div></td>

<td><div class='NoDay' ></div></td>

<td><div class='NoDay' ></div></td>

<td><div class='NoDay' ></div></td>

<td><div class='NoDay' ></div></td>

<td><div class='NoDay' ></div></td>

</tr>
</table>
</div>
</body>
</html>

 

 

here is the CSS:

/************************** CSS FOR SCHEDULE **************************/
/**** IE HOVER FIX START ****/
body, div.Daybox, table, td, tr, li, ul, span, img, a {
behavior:url("hvrfix.htc");
}
/**** IE FIX END ****/

/*************************/
/******* GENERAL *********/
/*************************/
body {
text-align:center;
margin:auto;
background:#663300;
background-image:url('imgs/background.png');
background-position:center center;
background-attachment:fixed;
}
#container {
text-align:center;
margin:auto;
width:734px;
background-color:black;
}
img {border:none;}
/*************************/
/*** CALENDAR DAYS CSS ***/
/*************************/
#CalDiv {
text-align:center;
margin:auto;
/*border:3px groove black;*/
width:734px;
background:transparent;
}
#dayTable {
text-align:center;
margin:auto;
}
#dayTable td {
text-align:left;
}
div.Daybox {
width:100px;
height:100px;
/*border:2px inset navy;*/
background-image:url('imgs/cell1.png');
background-color:transparent;
cursor:pointer;
}
div.Daybox.hover {
background-image:url('imgs/cell2.png');
}
div.Daybox:hover {
background-image:url('imgs/cell2.png');
}
div.NoDay{
width:100px;
height:100px;
/*border:2px inset navy;*/
background-image:url('imgs/cell3.png');
background-color:transparent;
}
/*************************/
/****** Day Names ********/
/*************************/
.Dnames{
background:black;
color:white;
font-size:larger;
border-left:1px solid white;
border-right:1px solid white;
border-top:1px solid white;
}

/*******************/
/**** PREV/NEXT ****/
/*******************/

img#prev{border:none;}
img#prev:hover{background-image:url('imgs/prev2.png');}
img#prev.hover{background-image:url('imgs/prev2.png');}

img#next{border:none;}
img#next:hover{background-image:url('imgs/next2.png');} 
img#next.hover{background-image:url('imgs/next2.png');}

/*************************/
/********* CAPS **********/
/*************************/
#Tc{
background-image:url('imgs/toppiece.png');
background-repeat:no-repeat;
width:734px;
height:48px;
text-align:center;
color:white;
}

#Bcorners{
width:734px;
height:144px;
position:relative;
top:-50px;
background-image:url('imgs/greenCorners.png');
}

/*****************/
/*** JS POP UP ***/
/*****************/
#Popper {
position:absolute;
width:100%;
z-index:1;
height:850px;
background-image:url('imgs/breaker.png');
margin:auto;
padding:0;
left:0px;
text-align:center;
vertical-align:center;
}
#PopDay {
width:500px;
height:500px;
background-color:red;
}

/*******************/
/**** LOGIN/OUT ****/
/*******************/
#LoginBox {
position:absolute;
left:10px;
top:50px;
width:100px;
height:100px;
text-align:center;
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.