alt text

How can I make the “A, Google” record also appear in the blue square, like “B, Yahoo!”?

The fact is that I ask this code in PHP:

<body> <?php while($row = mysql_fetch_assoc($result)) { printf(" <table cellspacing='10'> <tr> <td>%s</td> <td>%s</td> </tr> </table><br />", $row['title'], $row['link']); } ?> </body> 

And the CSS code for TD is in the jS file:

 $('td').css({ 'height' : grid_height, 'width' : grid_width, 'background-color' : '#69F' }); $('table').css({ 'position' : 'absolute', 'left' : '20px', 'top' : 0, 'bottom' : 0, 'right' : 0, 'margin-top' : margin_top }); 
  • A link to a working example can you give? html is all generated at once, or is something downloaded by ajax? - Sergiks
  • one
    This is a hidden ad from google and yahoo! :] - kandi
  • @sergiks ajax no. Normal HTML page that is filled from the database and whose CSS is dynamic and is located instead of STYLE.CSS in SONGS.JS. I want all the records from the database to be inside that blue tile with spaces at 1 <br /> - navi1893
  • Give all the HTML that comes out in the page. In some pastebin stick it, and link here. - Sergiks
  • You have absolute positioning of all tables - they are placed one above the other, only the last one is visible. - Sergiks

2 answers 2

 <body> <table cellspacing='10'> <?php while($row = mysql_fetch_assoc($result)) { printf("<tr><td>%s</td><td>%s</td></tr>", $row['title'], $row['link']); } ?> </table> </body> 

And, by the way, you always generate the same ID - <td id = 'td1'>% s,% s </ td>.

  • Again, not that. Laid out the screen in question (Updated). See what happened - navi1893
  • everything! I completed the rest myself. And what was the problem? - navi1893
  • 3
    The problem is that you don’t even know the very basics of CTML, CSC, Javascript and do everything at random, and if it doesn’t work out, then ask a lot of amateurish questions here. - artuska

Change the positioning from absolute to relative , it will be something like that .

  • only the location has changed. “A, Google” is now down, but again, NOT in the blue tile :( - navi1893