Alignment issue

Started by actionman, November 01, 2016, 12:03:25 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

actionman

hi guys, hope you can help

I am trying to make an image hide or show the rest of the table contents, the problem i have is valign doesnt work, i have even tried css equivalent (vertical-align:top) but no matter what i try it shows the image in the centre/middle see picture for example

what i am trying to acheive is the images/pics stay at the top of the table.

i have attached my code for this, so if someone can assist with this i would appreciate things.

Code (php) Select
$HTMLOUT .="<script type='text/javascript'>
/*<![CDATA[*/
function togglepic(bu, picid, formid){
var pic = document.getElementById(picid);
var form = document.getElementById(formid);

if(pic.src == bu + '/pic/plus.gif') {
pic.src = bu + '/pic/minus.gif';
form.value = 'minus';
}else{
pic.src = bu + '/pic/plus.gif';
form.value = 'plus';
}
}
/*]]>*/
</script>";
$HTMLOUT .="<script type='text/javascript'>
$(document).ready(function(){   
    $('.punish th.warn').click(function(){         
     $('.punish td.warn1').toggle();         
    });
    $('.punish th.2').click(function(){
     $('.punish td.2').toggle();
    });
     $('.punish th.permd').click(function(){
     $('.punish td.permd').toggle();
    });
$('.punish th.remp').click(function(){
     $('.punish td.remp').toggle();
    });
    $('.punish td').hide();
});

</script>";

$name="<font color='#" . get_user_class_color( $user['class'] ) . "'>".$user['username']."</font>";

//WARNING System
if(($user['warned'] != 0 )) {
$remwar = "<input name='warned1' value='42' type='radio' />Remove Warning";
} else if($user['downloadpos'] != 1) {
$remwar = "<input name='downloadpos1' value='42' type='radio' />Re-Enable Download Rights";
} else {
$remwar = 'No Punishments To Remove';
}
$hitnrun = '';
$weekw = "<img src='/images/warn.png' />";
$weekd = "<img src='/images/diss.png' />";
$permd = "<img src='/images/dissperm.png'  />";
$remp = "<img src='/images/remove.png'  />";
$hitnrun = "<table width='90%' align='center' ><tr><td>
<table width='100%' align='center'><tr><td colspan='4' align='center'  style='background-color:red;font-size:14pt'>Hit n Run</td></tr><tr><td>
<table  width ='25%' cellpadding='5' class='punish' align='center'><tr>
       <th class='warn' >$weekw</th>
       </tr>
       <tr>
       <td class='warn1'><select style='border-color:white'  name='warned1'>
     <option value='0'>No Punishment</option>
     <option value='1'>1 Week Warning</option>
     </select><br />Torrent Name 1::<input type='text' style='border-color:white' size='20' name='torrentname3' /><br />
   Time Seeded :<input type='text' style='border-color:white' size='7' name='seedfor3' /><br />
Torrent Name 2::<input type='text' style='border-color:white' size='20' name='torrentname4' /><br />
Time Seeded :<input type='text' style='border-color:white' size='7' name='seedfor4' /><br /><br />
IF YOU HAVE A THIRD TORRENT YOU ARE IN THE WRONG SECTION - GO TO DOWNLOAD RIGHTS SECTION AND DISABLE----></td></tr></table></td><td>

<table  width ='25%' cellpadding='5' class='punish' align='center'><tr>
       <th class='2'>$weekd</th></td>
       </tr>
       <tr>
       <td class='2'>Disable For <select style='border-color:white'  name='downloadpos1'>
     <option value='0'>No Punishment Selected</option>
     <option value='1'>1 Week Downloads Disabled</option>
<br />

Torrent Name 1::<input type='text' style='border-color:white' size='20' name='torrentname1' /><br />
Time Seeded :<input type='text' style='border-color:white' size='7' name='seedfor' /><br />
Torrent Name 2::<input type='text' style='border-color:white' size='20' name='torrentname2' /><br />
Time Seeded :<input type='text' style='border-color:white' size='7' name='seedfor2' /></td></tr></table></td><td>

<table  width ='25%' cellpadding='5' class='punish' align='center'><tr>
       <th class='permd'>$permd</th>
       </tr>
       <tr>
       <td class='permd' ><select style='border-color:white'  name='downloadpos'>
     <option value='0'>No Punishment Set</option>
     <option value='255'>Disabled till donates</option>
     <option value='266'>Disabled till contacts</option>
     </select></td></tr></table></td><td>

<table  width ='25%' cellpadding='5' class='punish' align='center'><tr>
       <th class='remp'>$remp</th>
       </tr>
       <tr>
       <td class='remp'>$remwar</td></tr></table>
   </td></tr></table>";


$hitnrun .= "</td></tr></table>";