mkr365 Posted May 17, 2008 Share Posted May 17, 2008 Hello, I have spend ours and ours just to solve the next problem but i don't see it anymore. I have some problems with the layout of my checkboxes. In iexplorer everthings looks perfectly fine but in firefox its a mess. Sometimes the name of the checkbox is underneath the checkbox instead of the right side of the checkbox, and because of that some checkboxes are not on the same height. I don't have css yet for these checkboxes but is it a css problem? Or is something wrong with my code. $result = mysql_query($sql) or die("MySQL Error<br>SQL statement: $sql<br>Error: ".mysql_error()); echo "<table><tr>"; $n = 0; while($query = mysql_fetch_array($result)) { if($n>0 && ($n%$perrow)==0) echo "</tr><tr>"; {if ($categorien == $row['RubriekID']) echo '<td><input type="checkbox" class="box" name="categorien[]" value="'.$query['RubriekID'].'">'.$query['Rubrieknaam'].'<td/>'; else echo '<td><input type="checkbox" class="box" name="categorien[]" value="'.$query['RubriekID'].'">'.$query['Rubrieknaam'].'<td/>'; } $n++; } while(($n++%$perrow)!=0) echo "<td> </td>"; echo "</tr></table>"; echo '</td></tr> <tr><td colspan="2"><input type="submit" value="zoeken"><input type="hidden" name="zoek" value="true"></td></tr> </table> Quote Link to comment Share on other sites More sharing options...
KenDRhyD Posted May 17, 2008 Share Posted May 17, 2008 I suspect that it has to do with the layout of the table itself, which is sensitive to the width of the display in the browser. You will see similar mess if you start to make your browser window more narrow. One approach may be to set the width of the table columns so that all columns are the same width, but for this you need to know how many columns are to be displayed. Quote Link to comment Share on other sites More sharing options...
mkr365 Posted May 22, 2008 Author Share Posted May 22, 2008 The solution: td style="white-space:nowrap;" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.