Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table - Not displaying properly in IE :(

Status
Not open for further replies.

I get nothing but a bunch of Javascript errors, and no content whatsoever... no matter what browser I use to visit the page.

Dan

 

But as a thought, try putting non-breaking spaces in your TDs and closing them with close tags, rather than HTML close tags.

Hope this helps,
Dan

 
Internet Exploder won't understand this as it doesn't understand XML syntax:
Code:
<td id="top-html-middle" height="20" />
Try putting this instead:
Code:
<td id="top-html-middle" height="20"></td>
As Dan said, you might find you need to put [tt]&nbsp;[/tt]s into each <td> as well.

You should also declare a proper doctype at the start of your document.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Like Chris said, if you're just starting with the page, you should start ok. Put a proper doctype at the beginning, that will help a lot. Also, consider what you're doing. Your code is messy and incorrect. You're using table for styling -- not really according to modern standards, but OK. It works. On top of that you're using absolute positioning and floats. All of that makes little to no sense. Either use table or CSS, not both. That will just make code bloated, hard to understand and full of potential bugs.
 
Alright, I have added a proper doctype, corrected the xml syntax and added few &nbsp; as well. But it still doesnt display properly in IE


@Vragabond,
Thanks for your comments. I am just learning CSS now - can u please explain how I can achieve the same results using div's and proper CSS instead of those messy tables?
 

Is it possibly something to do with the fact that the middle TD is absolutely positioned, but has no width specified?

Dan

 
A problem that you will run into when you come to slice your images is that you have not used non-dithering colors. Try #009900 for the border color.

Code:
<!doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<style>
body { 
	background-color: #e7fbc0;
	margin-left: 15px;
  	font-family: verdana, arial, sans-serif;
  	font-size: 12px;
}
#top-html-middle{			
	background-image: url(images/top.gif);	
	background-repeat: repeat-x;		
}
#top-html-right{
	background-image: url(images/top_right_corner.gif);	
	background-repeat: no-repeat;	
}
#top-html-left{
	background-image: url(images/top_left_corner.gif);	
	background-repeat: no-repeat;		
}
</style>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
<td id="top-html-left"   width="20" height="20">&nbsp;</td>
<td id="top-html-middle" height="20">&nbsp;</td>	
<td id="top-html-right"  width="20" height="20">&nbsp;</td>
</tr></table></body></html>

Clive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top