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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.