Markup changes breaking in Firefox

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
tad-20
Forum Newbie
Posts: 2
Joined: Fri Feb 22, 2008 10:26 am

Markup changes breaking in Firefox

Post by tad-20 »

Hi,

I have recently bought whois.cart to make an online order system for my web hosting. I was starting to edit my cart the other day, using PHP Include Method to include a footer and header to save me having to add the code manually each time. The code on the template files uses tables. I included the header in a new table, above the main order content. Unfortunately whois.cart doesn't appear to have its own forum any more so thats why I'm asking here.

However I viewed the file in internet explorer 7 when it was published and it displayed perfectly, however when i viewed it in Mozilla Firefox 2.0 it displayed horribly, with things being 'mashed' up. Two screen shots are attached.

I have also included my code below to see if anyone can spot where I went wrong and guide me in the right direction to get it right in both browsers.

This is the link to the order page: http://www.cornishwebsolutions.co.uk/or ... /index.php

Code:

Code: Select all

<!-- F -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel=stylesheet href="https://www.cornishwebsolutions.co.uk/order-hosting/themes/CWSDHO/includes/system.css" type="text/css">
<script language="javascript" type="text/javascript">
//<![CDATA[
var cot_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/cot.js" :
"http://www.trustlogo.com/trustlogo/javascript/cot.js";
document.writeln('<scr' + 'ipt language="JavaScript" src="'+cot_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>');
//]]>
</script>
</head>
<body background="https://www.cornishwebsolutions.co.uk/images/background_diag.gif">
<br>
<table width="780" height= "340" border="0" align="center" cellpadding="0" cellspacing="0" <? include ('header.php'); ?>
<table width="780" border="0" align="center" cellpadding="0" bordercolor="#ffffff" cellspacing="0">
  <tr>
   <td background="https://www.cornishwebsolutions.co.uk/images/main_sides.gif">
      <p align="right" <a href="index.php"><img src="https://www.cornishwebsolutions.co.uk/order-hosting/themes/CWSDHO/images/m_register.gif" alt="Search to register new domains" width="80" height="48" border="0"></a><a href="transfer.php"><img src="https://www.cornishwebsolutions.co.uk/order-hosting/themes/CWSDHO/images/m_transfer.gif" alt="Transfer existing domains" width="80" height="48" border="0"></a><a href="hosting.php"><img src="https://www.cornishwebsolutions.co.uk/order-hosting/themes/CWSDHO/images/m_host.gif" alt="Purchase hosting space" width="80" height="48" border="0"></a><a href="checkout.php"><img src="https://www.cornishwebsolutions.co.uk/order-hosting/themes/CWSDHO/images/m_checkout.gif" alt="Complete your order" width="80" height="48" border="0"></a></p>
      <p align="center" class="systemtext">%TLD SELECT%</p>
      <p align="center" class="systemtext">              %SEARCH RESULTS%</p>      <p align="center" class="systemtext">%CART CONTENTS%</p>
   </td>
  </tr>
<table width="780" height= "98" border="0" align="center" cellpadding="0" cellspacing="0" <? include ('footer.php'); ?>
</table>
<script language="JavaScript" type="text/javascript">
COT("https://www.cornishwebsolutions.co.uk/images/secure_site.gif", "SC2", "none");
</script>
</body>
</html>
<!-- F -->
Thanks For any help you can give,

Thomas
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
Attachments
order_screen_php.jpg
order_screen_php.jpg (65.17 KiB) Viewed 260 times
Last edited by RobertGonzalez on Fri Feb 22, 2008 11:32 am, edited 1 time in total.
Reason: Obscure title replaced with something more meaningful
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: Markup changes breaking in Firefox

Post by RobertGonzalez »

Moved to Client Side since this is more than likely markup/style related.

Also renamed the title to be more descriptive.
User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

Re: Markup changes breaking in Firefox

Post by arjan.top »

sorry but that code is horrible ...

1. You have multiple html elements in the document
2. What is this?

Code: Select all

<table width="780" height= "340" border="0" align="center" cellpadding="0" cellspacing="0" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
etc.

Browsers can't do miracles to display this
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: Markup changes breaking in Firefox

Post by RobertGonzalez »

Hadn't noticed that.

Look at where you are including your header and footer. They are inside of tables that are never closed. That will break rendering in almost any browser except IE (because IE is a piece of crap that doesn't really understand its purpose in life).
Post Reply