HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 9th, 2004, 04:45 PM
shamrog12's Avatar
shamrog12 shamrog12 is offline
Newton's Apple Wizard
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 1,661 shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Weeks 2 Days 2 h 39 m 22 sec
Reputation Power: 34
Send a message via AIM to shamrog12
IE 6 and CSS Div Layers

I have posted the code below. Basically, in IE6 if I have a div positioned relatively in relation to its surrounding table there are many blank spaces that apper at the top of my page that i assume are IE6's way of reserving room for that div element. Does anyone know how to get this to work in IE6?

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body {
	margin:0;
	padding:0;
	text-align:center;
}
p, td {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
}
table.outer {
	margin-left:auto;
	margin-right:auto;
	background-color:#e5e5e5;
	height:400px;
	vertical-align:top;
}
div.outerdiv {
	background-color:#e5e5e5;
	position:relative;
	width:770px;
	text-align:left;
	
}
.PStyle1 {
	color:black;
	position:relative;
	text-align:left;
}
-->
</style>
</head>
<body>

<div class="outerdiv" style="margin-left:auto; margin-right:auto;">
<div class="PStyle1" style="left:200px; top:100px; height:0px;"><img src="" alt="" name="spaceHolder" width="50" height="50" id="spaceHolder" style="background-color: #666666" /></div><div class="PStyle1" style="left:300px; top:200px; height:0px;"><img src="" alt="" name="spaceHolder" width="50" height="50" id="spaceHolder" style="background-color: #666666" /></div>
<table width="770" border="0" cellspacing="0" cellpadding="0" class="outer">
  <tr>
    <td style="vertical-align:top;text-align:left;">
<table width="770" border="0" cellspacing="0" cellpadding="0" style="background-color:blue;">
  <tr>
    <td>this should be at the top of the page</td>
  </tr>
</table>
	<p style="background-color:white;">This should be a tiny bit below the blue bar</p></td>
  </tr>
</table>
</div>

</body>
</html>
__________________
If you found a post of mine helpful, please click on the on my post to add to my reputation.


Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > IE 6 and CSS Div Layers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway