MySQL_Narb Posted February 18, 2013 Share Posted February 18, 2013 <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Pfft</title> <style> body { background-color:black; } .post { padding:25px; margin-left:auto; margin-right:auto; background-color:#980000; border:1px solid #580000; width:650px; } .message { margin-left:auto; margin-right:auto; background-color:#980000; border:1px solid #580000; width:650px; } .hidden { display:none; } </style> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ var step1 = $('#step1'); var step2 = $('#step2'); $('input[name="type"]').change(function(){ hideAll(); step2.show('fast'); if($('input[name="type"]:checked').val() == 'posts'){ $('tr[id="is_posts"]').show(); } }); $('button[name="reset"]').click(function(){ hideAll(); step1.show(); $('input[name="thread"]').val(''); $('input[name="forum"]').val(''); $('textarea[name="content"]').val(''); }); function hideAll(){ step1.hide('fast'); step2.hide('fast'); } }); </script> </head> <body> <div class="post"> <form action="index.php" method="POST"> <div id="step1"> <input type="radio" name="type" value="threads">Threads or <input type="radio" name="type" value="posts"> Posts </div> <div id="step2" class="hidden"> <table> <tr> <td>Forum ID<td/> <td><input type="text" name="forum"></td> </tr> <tr id="is_posts" class="hidden"> <td>Thread ID</td> <td><input type="text" name="thread"></td> </tr> <tr> <td><button name="step3">Continue</button></td> <td><button name="reset">Reset</button></td> </tr> </table> </div> </form> </div> <?php if(isset($_POST['message']) && ctype_digit($_POST['amount'])){ ?> <div class="message"> Your messages are being sent. </div> <?php } ?> </body> </html> Whenever the tr with the id #is_posts isn't hidden, the first tr in the table becomes deformed. Here's a picture: http://puu.sh/24laL Link to comment https://forums.phpfreaks.com/topic/274613-table-messed-up/ Share on other sites More sharing options...
Jessica Posted February 18, 2013 Share Posted February 18, 2013 <td>Forum ID<td/> Notice anything?? Link to comment https://forums.phpfreaks.com/topic/274613-table-messed-up/#findComment-1413061 Share on other sites More sharing options...
MySQL_Narb Posted February 20, 2013 Author Share Posted February 20, 2013 <td>Forum ID<td/> Notice anything?? Hah, wow. I always know it's something so simple, but no matter how long I look through the code I miss these things. Thanks. Link to comment https://forums.phpfreaks.com/topic/274613-table-messed-up/#findComment-1413743 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.