Jump to content

Table messed up?


MySQL_Narb

Recommended Posts


<!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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.