8 Replies - 6439 Views - Last Post: 20 July 2005 - 09:30 PM

#1 iamcenz   User is offline

  • You wish you were my hand!
  • member icon

Reputation: 7
  • View blog
  • Posts: 2,443
  • Joined: 26-March 01

spacing problem.

Posted 27 June 2005 - 10:32 AM

hey, im having a problem with white space and IE, when i view the site in Firefox it is spaced the way i want it to be, the way the code tells it to be. but in IE its all messed up. take a look at these pics it explains it better.

This is Firefox
Posted Image

This is IE
Posted Image

now look at the space between the left buttons and the text in the middle.

here is the code for the page. tell me what could be wrong
<?php require_once('Connections/conn.php'); ?>
<?php
$c_a = "1";
if (isset($_GET['cat'])) {
  $c_a = (get_magic_quotes_gpc()) ? $_GET['cat'] : addslashes($_GET['cat']);
}
$p_a = "3";
if (isset($_GET['page'])) {
  $p_a = (get_magic_quotes_gpc()) ? $_GET['page'] : addslashes($_GET['page']);
}
mysql_select_db($database_conn, $conn);
$query_a = sprintf("SELECT * FROM site WHERE catID = %s AND pageID = %s", $c_a,$p_a);
$a = mysql_query($query_a, $conn) or die(mysql_error());
$row_a = mysql_fetch_assoc($a);
$totalRows_a = mysql_num_rows($a);
?>
<html>
<head>
<script type="text/javascript" src="milonic_src.js"></script>	
<link href="styles.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
}
-->
</style>
	<script	type="text/javascript">
	if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");  
   else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>"); 
	</script>
	<script type="text/javascript" src="menu_data.js"></script>
<title>ASK Technology Solutions :: <?php echo $row_a['title']; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table id="Table_01" width="100%" height="63%" border="0" cellpadding="0" cellspacing="0">
	<tr>
  <td height="118" colspan="15" background="images/bg.jpg">
 	 <img src="images/ask_01.jpg" width="740" height="118" alt=""></td>
	</tr>
	<tr valign="top" background="images/ask_15.jpg">
  <td height="28" colspan="14" background="/images/ask_15.jpg">                              
   <p align="right"><img src="images/toll.jpg" width="169" height="28"><img src="images/ask_14.jpg" width="44" height="28"></p>    </td>
     <td background="/images/ask_15.jpg"><img src="images/ask_15.jpg" width="13" height="28" align="right"></td>
	</tr>
	<tr>
  <td height="430" width="220" colspan="7" valign="top" background="images/ask_22.jpg"><?
switch ($_GET['cat']) {
case 1:
  include("cat1_menu.php");
  break;
case 2:
  include("cat2_menu.php");
  break;
case 3:
  include("cat3_menu.php");
  break;
case 4:
  include("cat4_menu.php");
  break;
case 5:
  include("cat5_menu.php");
  break;
default:
 include("cat1_menu.php");
}
?></td>
  <td colspan="8" valign="top"><table width="100%" height="100%"  border="0" align="left" cellpadding="2" cellspacing="0">
          <tr>
            <td valign="top"><?php echo $row_a['content']; ?></td>
          </tr>
        </table></td>
	</tr>
	<tr>
  <td height="2">
 	 <img src="images/spacer.gif" width="51" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="13" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="65" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="15" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="67" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="14" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="9" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="42" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="12" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="67" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="12" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="169" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="147" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="44" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="13" height="1" alt=""></td>
	</tr>
</table>
</body>
</html>
<?php
mysql_free_result($a);
?>


Is This A Good Question/Topic? 0
  • +

Replies To: spacing problem.

#2 jaredigital   User is offline

  • 42. That's my final answer.
  • member icon

Reputation: 1
  • View blog
  • Posts: 4,090
  • Joined: 22-April 01

Re: spacing problem.

Posted 28 June 2005 - 11:02 AM

If you posted a link to the page, that would be much more helpful...
Was This Post Helpful? 0
  • +
  • -

#3 supersloth   User is offline

  • serial frotteur - RUDEST MEMBER ON D.I.C.
  • member icon


Reputation: 4694
  • View blog
  • Posts: 28,513
  • Joined: 21-March 01

Re: spacing problem.

Posted 28 June 2005 - 12:08 PM

yeah, your looking at a fully generated page and then the code is to a page with includes and stuff, those types of things tend to change the final output of the page :)
Was This Post Helpful? 0
  • +
  • -

#4 iamcenz   User is offline

  • You wish you were my hand!
  • member icon

Reputation: 7
  • View blog
  • Posts: 2,443
  • Joined: 26-March 01

Re: spacing problem.

Posted 28 June 2005 - 05:30 PM

good point http://www.ask4technology.com
Was This Post Helpful? 0
  • +
  • -

#5 iamcenz   User is offline

  • You wish you were my hand!
  • member icon

Reputation: 7
  • View blog
  • Posts: 2,443
  • Joined: 26-March 01

Re: spacing problem.

Posted 29 June 2005 - 12:47 PM

bump
Was This Post Helpful? 0
  • +
  • -

#6 iamcenz   User is offline

  • You wish you were my hand!
  • member icon

Reputation: 7
  • View blog
  • Posts: 2,443
  • Joined: 26-March 01

Re: spacing problem.

Posted 29 June 2005 - 01:33 PM

will the site ever look the same in IE and FF. 99% of out visitors are using IE, so i the past 2 days have been trying to get it to like right in IE, in doing so it makes FF look even worse. but when FF looks right IE looks like i hacked it up and threw the peices all over the browser.
Was This Post Helpful? 0
  • +
  • -

#7 iamcenz   User is offline

  • You wish you were my hand!
  • member icon

Reputation: 7
  • View blog
  • Posts: 2,443
  • Joined: 26-March 01

Re: spacing problem.

Posted 30 June 2005 - 09:17 AM

more detailed explantion on what i need. since i cant seem to figure this stupid thing out.

ok, so i use FF as my main browser. and my mac using safari as my main browser. well i make the website for my boss and he tells me the spacing for the words are all messed up. i go on my PC and it looks fine, i go to the mac, looks fine. then i open IE and its friggin horrid. so since 99.9% of our clients are idiots and use IE im trying to make it look perfect in IE right now then find a way to get it to look right in FF also. now heres how this website works. its a dynamic site using php. i know this isnt the php forum but i dont think it has to do with that so im posting it in here. Anyway. i have a MYSQL database storing some HTML in it, this way my boss can edit some thing with out messing up others. some pages the spacing is perfect, others just create to much of a gap. here is some examples. http://www.ask4technology.com <-- the spacing is right on the main page. http://www.ask4techn.../?cat=2&page=14 <-- spacing is wrong on the remote page.

here is the code for the page.
<?php require_once('Connections/conn.php'); ?>
<?php
$c_a = "1";
if (isset($_GET['cat'])) {
  $c_a = (get_magic_quotes_gpc()) ? $_GET['cat'] : addslashes($_GET['cat']);
}
$p_a = "3";
if (isset($_GET['page'])) {
  $p_a = (get_magic_quotes_gpc()) ? $_GET['page'] : addslashes($_GET['page']);
}
mysql_select_db($database_conn, $conn);
$query_a = sprintf("SELECT * FROM site WHERE catID = %s AND pageID = %s", $c_a,$p_a);
$a = mysql_query($query_a, $conn) or die(mysql_error());
$row_a = mysql_fetch_assoc($a);
$totalRows_a = mysql_num_rows($a);
?>
<html>
<head>
<script type="text/javascript" src="milonic_src.js"></script>	
<link href="styles.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
}
.style1 {
	color: #CCCCCC;
	font-size: 10px;
}
-->
</style><div class=milonic><a href="http://www.milonic.com/">Javascript Menu, DHTML Menu Powered By Milonic</a></div>
	<script	type="text/javascript">
	if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");  
   else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>"); 
	</script>
	<script type="text/javascript" src="menu_data.js"></script>
<title>ASK Technology Solutions :: <?php echo $row_a['title']; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table id="Table_01" width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
  <td height="118" colspan="16" background="images/bg.jpg">
 	 <img src="images/ask_01.jpg" width="740" height="118" alt=""></td>
	</tr>
	<tr valign="top" background="images/ask_15.jpg">
  <td height="28" colspan="15" background="/images/ask_15.jpg">                              
   <p align="right"><img src="images/toll.jpg" width="169" height="28"><img src="images/ask_14.jpg" width="44" height="28"></p>    </td>
     <td width="39" background="/images/ask_15.jpg"><img src="images/ask_15.jpg" width="13" height="28" align="right"></td>
	</tr>
	<tr>
  <td colspan="8" valign="top" background="images/ask_22.jpg"><?
switch ($_GET['cat']) {
case 1:
  include("cat1_menu.php");
  break;
case 2:
  include("cat2_menu.php");
  break;
case 3:
  include("cat3_menu.php");
  break;
case 4:
  include("cat4_menu.php");
  break;
case 5:
  include("cat5_menu.php");
  break;
default:
 include("cat1_menu.php");
}
?></td>
  <td colspan="8" align="left" valign="top"><table width="50%" height="100%"  border="0" align="left" cellpadding="2" cellspacing="0">
          <tr>
            <td align="left" valign="top"><div align="left"><?php echo $row_a['content']; ?></div></td>
          </tr>
      </table>
   <br></td>
	</tr>
	<tr>
   <td width="45" height="10" valign="bottom" background="images/ask_22.jpg">&nbsp;</td>
      <td width="6" valign="bottom" bgcolor="#2A3E7B">&nbsp;</td>
      <td colspan="6" valign="bottom" bgcolor="#2A3E7B">&nbsp;</td>
      <td colspan="8" align="left" valign="middle" bgcolor="#2A3E7B"><div align="center"><span class="style1">Copyright &copy; 2002-2005 ASK Technology Solutions, Inc. </span></div></td>
  </tr>
	<tr>
  <td height="2" colspan="2">
 	 <img src="images/spacer.gif" width="51" height="1" alt=""></td>
  <td width="16">
 	 <img src="images/spacer.gif" width="13" height="1" alt=""></td>
  <td width="68">
 	 <img src="images/spacer.gif" width="65" height="1" alt=""></td>
  <td width="15">
 	 <img src="images/spacer.gif" width="15" height="1" alt=""></td>
  <td width="70">
 	 <img src="images/spacer.gif" width="67" height="1" alt=""></td>
  <td width="14">
 	 <img src="images/spacer.gif" width="14" height="1" alt=""></td>
  <td width="9">
 	 <img src="images/spacer.gif" width="9" height="1" alt=""></td>
  <td width="43">
 	 <img src="images/spacer.gif" width="42" height="1" alt=""></td>
  <td width="12">
 	 <img src="images/spacer.gif" width="12" height="1" alt=""></td>
  <td width="70">
 	 <img src="images/spacer.gif" width="67" height="1" alt=""></td>
  <td width="12">
 	 <img src="images/spacer.gif" width="12" height="1" alt=""></td>
  <td width="180">
 	 <img src="images/spacer.gif" width="169" height="1" alt=""></td>
  <td width="157">
 	 <img src="images/spacer.gif" width="147" height="1" alt=""></td>
  <td width="45">
 	 <img src="images/spacer.gif" width="44" height="1" alt=""></td>
  <td>
 	 <img src="images/spacer.gif" width="13" height="1" alt=""></td>
	</tr>
</table>
</body>
</html>
<?php
mysql_free_result($a);
?>



here is the code in the database where <?php echo $row_a['content']; ?> pulls from. this is for the remote page.
<script language="Javascript">
<!--
function setJS()
{
document.QuestionEntry.Javascript.value = "true";
document.QuestionEntry.Target.value = "he/queryPost";
}
// Just in case the JS from the broker can't be loaded
function addOnlineReps()
{
document.write('<option value="-1" selected>First available');
}
//-->
                  </script>
      <script LANGUAGE="Javascript" SRC="http://broker.gotoassist.com/servlet/com.ec.expertbroker.servlets.OnlineExpertsServlet?Portal=ask"></SCRIPT>
                <form action="http://broker.gotoassist.com/h/ask" method=get name=QuestionEntry>
              <input type=hidden name=Portal value=ask>
              <input type=hidden name=Target value=ds/queryPost>
              <input type=hidden name=Template value=ds/onlineExperts.tmpl>
              <input type=hidden name=Javascript value=false>
              <input type=hidden name=Form value=askSmartBox>
              <input type=hidden name=Question value="Start Session">
              <input type=hidden name=Audience value="ie">
<table width="50%"  border="0" align="left" cellpadding="2" cellspacing="0">
  <tr>
    <td><font face=verdana,arial,helvetica size=2><b><i>Live representatives are online and standing by!</i></b></font></td>
  </tr>
  <tr>
    <td>Name: 
    <input name="Name_Full" type="text" id="Name_Full"></td>
  </tr>
  <tr>
    <td>Company: 
    <input name="CompanyName" type="text" id="CompanyName"></td>
  </tr>
    <script language="Javascript">
<!--
document.write('<tr><td colspan=2><b><i>Choose your representative and click "Continue" to proceed.</i></b></td></tr>');
document.write('<tr><td height=8></td></tr>');
document.write('<tr><td><select name="ExpertKeys">');
addOnlineReps(); // this will add some more options
document.write('</select></td>');
document.write('<td><input type=submit value=Continue onclick=setJS()></td></tr>');
document.write('<tr><td height=22></td></tr>');
//-->
</script>
</table>

This post has been edited by iamcenz: 30 June 2005 - 09:18 AM

Was This Post Helpful? 0
  • +
  • -

#8 Arbitrator   User is offline

  • D.I.C Addict
  • member icon

Reputation: 52
  • View blog
  • Posts: 530
  • Joined: 26-January 05

Re: spacing problem.

Posted 02 July 2005 - 01:03 AM

Maybe you should try using CSS instead of the "align" attribute?

.paragraph {text-align: left;}
<div class="paragraph">
<p class="paragraph">

I normally test code myself to see if I can get it to work but I have no way of testing PHP.

This post has been edited by Arbitrator: 02 July 2005 - 01:05 AM

Was This Post Helpful? 0
  • +
  • -

#9 brokenyoyo   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 17-May 05

Re: spacing problem.

Posted 20 July 2005 - 09:30 PM

I not sure if Arbitrator right. Although I don't know the problem.

If I would you I would just try to clean and vaildate the code--its really messing. You should get the html vaildator extension for firefox, that way you don't have to go to w3 when you want to check it. Good Luck.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1