Jump to content

problems with height in IE


SFB

Recommended Posts

I have a problme with

<?phpsession_start();$username = $_SESSION['username'];$first = $_SESSION['first'];$last = $_SESSION['last'];$email = $_SESSION['email'];$website = $_SESSION['website'];$style = "/Program Files/xampp/htdocs/test/style.php";$snav = "/Program Files/xampp/htdocs/nav/snav.txt";$bnav = "/Program Files/xampp/htdocs/nav/bnav.txt";?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head>	<title>Snow Fort Builders -- Home </title>	<meta name='keywords' content='Snow Fort, snowfort, snow fort builders, snow, fort ' />	<meta name='description' content='Learn how to build snow forts just like mine, see pictures of my snow forts and other winter related activities' />	<meta name='robots' content='all' />	<meta http-equiv='content-Type' content='text/html charset=ISO-8859-1' /><?php include($style); ?><base href='http://snowforts.ath.cx/' /></head><table>	<tr>		<td class='title'>			<div class='header'>Snow Fort Builders</div>		</td>	</tr>	<tr>		<td class='title'>			<div class='url'>http://snowforts.ath.cx</div>		</td>	</tr>	<tr>		<td class='welcome'>			<div class='welcome'><?php if(isset($_SESSION['username'])){print" Welcome $first $last | <a href='/login/profile.php'><Profile</div></a> | <a href='/login/logout.php'><div class='welcome'>logout</div></a> ";}else{print"Welcome <a href='/login/newuser.php'><div class='welcome'>Guest</div></a>| <a class='welcome' href='/login'><div class='welcome'>Login</div></a>";}?></div>		</td>	</tr>	<tr>		<td class='middle'>			<div class='snav'>					<div class='r6'>						<?php include($snav); ?>					</div>			</div>			<div class='content'>					<div class='scroll'>						<div class='bold'>Home</div><br /><br />						<div>Snow Fort News</div><br />The end of snow fort building season has ended!  Last year was not very good for snow forts.  January and Febuary were too warm and we did not recive much snow. In march we recived over a foot of snow but I felt like making a sleading track insted.  <br /><br />						<div>Updates </div><br />						<div>XHTML</div>--This site is now Valid XHTML<br />						<div>New photos</div>--I added some pictures of my snow forts form before 2003<br />						<div>Contact Us</div>--I got the Contact page working again.<br />						<div>Settings</div>--You can choose the colors as well as some preset settings.<br />						<div>Message Board</div>--Added style tags and improved display in Internet Explorer.<br />						<div>Loading Time</div>--decreased loading time by removing statcounter<br />						<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />test<br />					</div>			</div>		</td>	</tr>	<tr>		<td class='bottom'>			<div class='bnav'>				<div class='rtop'></div>				<div class='r2'></div>				<div class='r3'></div>				<div class='r4'></div>				<div class='r5'></div>					<div class='r6'>						<?php include($bnav); ?>					</div>				<div class='r5'></div>				<div class='r4'></div>				<div class='r3'></div>				<div class='r2'></div>				<div class='rbottom'></div>			</div>		</td>	</tr></table></body></html>

dynamic stylesheet(php)

<?phpif(isset($_COOKIE['background'])){$color = $_COOKIE['background'];$color1 = $_COOKIE['tdbg'];$color2 = $_COOKIE['links'];$color4 = $_COOKIE['title'];$color5 = $_COOKIE['text'];}else{$color = "F0F8FF";$color1 = "039";$color2 = "F0F8FF";$color4 = "039";$color5 = "F0F8FF";}print <<<STYLESHEET<style type="text/css">	body {	font-family: verdana, arial, sans-serif;	font-size: small;	background-color: #$color;}table {	margin-left: auto;	margin-right: auto;	height: 90%;	width: 80%;}td.title {	text-align: center;}td.welcome {	text-align: right;}td.middle {	text-align: left;	vertical-align: top;	height: 100%}td.bottom {	text-align: center;	width: 100%;	height: auto;}div.snav {	float: left;	padding-right: 5px;	width: 25%;	height: 100%;}div.content {	font-size: small;	width: 75%;	height: 100%;}div.bnav {	font-size: small;	height: 100%;}div.rtop {	display: block;	overflow: hidden;	height: 1px;	font-size: 1px;	background: #$color1;	margin: 0px 5px;}div.rbottom {	display: block;	overflow: hidden;	height: 1px;	font-size: 1px;	background: #$color1;	margin: 0px 5px;}div.r2 {	display: block;	overflow: hidden;	height: 1px;	font-size: 1px;	background: #$color1;	margin: 0px 3px;}div.r3 {	display: block;	overflow: hidden;	height: 1px;	font-size: 1px;	background: #$color1;	margin: 0px 2px;}div.r4 {	display: block;	overflow: hidden;	height: 1px;	font-size: 1px;	background: #$color1;	margin: 0px 1px;}div.r5 {	display: block;	overflow: hidden;	height: 1px;	font-size: 1px;	background: #$color1;	margin: 0px 1px;}div.r6 {	background: #$color1;	font-size: small;	overflow: auto;	height: 100%;	display: block;	padding-right: 5px;	padding-left: 5px;}div.scroll {	background: #$color1;	font-size: small;	overflow: auto;	height: 100%;	display: block;	padding-right: 5px;	padding-left: 5px;}a.snav:link, a.snav:active, a.snav:visited {	text-indent: 10px;	vertical-align: top;	font-size: small; 	color: #$color2;	text-decoration: none;}a.snav:hover {	text-indent: 10px;	vertical-align: top;	font-size: small;	color: #$color2;	text-decoration: underline;}a:link, a:active, a:visited, a:hover {	text-decoration: underline;	color: #$color2;}div.bold {	color: #$color5;	font-size: small;	font-weight: bold;	display: inline; }div.header {	font-family: Comic Sans MS, arial, verdana, sans-serif;	font-size: 50px; 	font-weight: bold;	display: block;	text-align: center;	color: #$color4;}div.url {	font-family: Comic Sans MS, arial, verdana, sans-serif;	font-size: 20px;	font-weight: bold;	display: block;	text-align: center;	color: #$color4;}div.welcome {	font-size: small; 	color: #$color4;	display: inline;}div {	font-size: small; 	color: #$color5;	display: inline;}</style>STYLESHEET;?>

edit: fixed link to ie screen print

Link to comment
Share on other sites

Try messing with both position: absolute and position: relative of the snav class. It sounds strange but it's fixed lots of my positioning and height problems. I woudl try position: relative first.Good luck

Link to comment
Share on other sites

My therory is that IE has some problem setting the height of the div because the height of the tabel and td it is in are precents. if i set a specific height for the td (in px) then the div is the corect height. the position relitive mad no difference the position absolute mad everything end up sitting ontop of eachother.Edit: when one thing works in FF it doesnt work in IE. When one thing i try works in IE It Makes it display wrong in FF.Theory #2 When the page is loading it decides the height of the td from the div inside(even though it should be a % of the table) then it goes to the next div inside and it is like oh no the td is too small. now insted of adjusting the previous div too it just makes the td size adjustment then moves on.Theory #3 IE tried to change W3 standards but forgot that it couldnt.Edit #2: I got it working 95%. the only major thing is that in IE it scrolls and in FF it places a scroll bar there but it scrolls only half a line. if i could i would like to remove the bar in FF. I wish there was some sort of way for php to dectect the type of browser the user has.

Link to comment
Share on other sites

You probably know but you can tell what the browser is from javascript and can call the right page to set a session variable for their browser type. Also, in CSS there's a trick where you can do the following to get only IE to see certain styles.

<style type="text/css">...non ie and stuff that does work in ie...</style><!--[if IE]><style type="text/css">...IE only styles....</style><![endif]-->

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...