the table change it when i add a dynamic code with PHP

OK

I have this page: http://www.sitemx.mx/studies.php.

The main data of this page is loaded from another page using ckeditor. This content is saved in a database and when studies.php is loaded the content is loaded from the database.

One of the part of the site, is the glossary of terms. (this terms are saved in a database).
My user wants that when studies.php is loaded the page make a dynamic links when a word of studies.php matches with the data saved on the glossary.

The problem is when the page do the dynamics links
THIS CODE:  
$temporal = '<a onclick="abrir(\'terms.php?recordID='.$row['clave'].'\',\'279\',\'701\',2,\''.$row['clave'].'_terms\')" href="#">'.$palabras[$i].'</a>';			$imprime = $imprime. " ".$temporal;

Open in new window

.

The format of the page change a lot, for example: http://www.sitemx.mx/test1.php.

I think the problem is on the last part of the code, because this table when the page do dynamic links is printed onside the main table, when his real position is outside the main table.
 
echo '<table border="0" width="950" cellspacing="0" cellpadding="0" id="table714">';
             echo ' <tr>';
             echo '  <td width="475">';
             echo '   <font class="menu_titulo"><br></font>';
             echo '  </td>';
             echo '  <td width="475" align="right">';
             echo '   <font class="menu_titulo"><br>';
             echo '      ';
             echo '   </font>';
             echo '  </td>';
             echo ' </tr>';
             echo '</table>';

Open in new window

.

This is the code all the code where I check is there is a match with the words on the glossary:
 code1.txt


If you need this is the all code of studies.php
 page.txt
altariamx2003Asked:
Who is Participating?
 
Ray PaseurCommented:
Check these links to the W3C validation service.  If you have valid HTML, you will be using more CSS and you will probably be able to avoid unexpected changes in width.  What is probably happening is that a combination of an image (display-block) with an explicitly sized table is causing the display area to expand.

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.sitemx.mx%2Ftest2.php&charset=%28detect+automatically%29&doctype=Inline&group=0
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.sitemx.mx%2Ftest1.php&charset=%28detect+automatically%29&doctype=Inline&group=0

A good tool that can help you find what is causing the expansion is the Firebug plug-in for Firefox.   You can open it up and put your mouse over the HTML, and it will highlight the elements on the page that are generated by the HTML.
0
 
Frank ContrepoisVP Technical SalesCommented:
Check the <div align="center"> is present in your php version of the file

prefer the use of <div style="margin-right:auto; margin-left:auto;" > to center things
0
 
Ray PaseurCommented:
OK, what is the question?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
altariamx2003Author Commented:
Hi Ray

Why when the page add the dynamic links the format of table change it???

this is the link that I add for this issue (exampe: http://www.sitemx.mx/test1.php
0
 
altariamx2003Author Commented:
hi fcontrepois

at the end of the page I add this code:
 
echo '<table border="0" width="950" cellspacing="0" cellpadding="0" id="table714">';
             echo ' <tr>';
             echo '  <td width="475">';
             echo '   <font class="menu_titulo"><br></font>';
             echo '  </td>';
             echo '  <td width="475" align="right">';
             echo '   <font class="menu_titulo"><br>';
             echo '      ';
             echo '   </font>';
             echo '  </td>';
             echo ' </tr>';
             echo '</table>';

Open in new window


If I remove this code this is how the page looks: http://www.sitemx.mx/test2.php

As you can see  the format looks fine and everything works great

I would like to know why no matter what kind of table I add add the end of the page the format change.

0
 
altariamx2003Author Commented:
Thx for your help

I found the solution by myself
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.