1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: need to shorten input boxes

Discussion in 'Web Design & Development' started by ckdoublenecks, Sep 4, 2010.

Thread Status:
Not open for further replies.
Advertisement
  1. ckdoublenecks

    ckdoublenecks Thread Starter

    Joined:
    May 28, 2009
    Messages:
    112
    most of the fields are only 4 characters long but when the table is displayed, I have to scroll across to update because all the boxes are so long. Is there a way to avoid this?


    PHP Code:
    <table cellspacing=0 cellpadding=0 border=1>
    <tr>
    <th>dep</th>
    <th>tenant</th>
    <th>apt</th>
    <th>paid</th>
    <th>due</th>
    <th>prev</th>
    <th>misc</th>
    <th>tentpay</th>
    <th>hudpay</th>
    <th>datepaid</th>
    <th>comments</th>
    </tr>";
    while($row = mysql_fetch_assoc($result))
    {
    echo "<tr>
    <td><input type='text' name='dep' value='" . $row['dep'] . "'></td>
    <td><input type='text' name='name' value='" . $row['name'] . "'></td>
    <td><input type='text' name='apt' value='" . $row['apt'] . "' readonly style='border:none;' onmouseup='this.blur()'></td>
    <td><input type='text' name='amtpaid' value='" . $row['amtpaid'] . "'></td>
    <td><input type='text' name='rentdue' value='" . $row['rentdue'] . "' readonly style='border:none;' onmouseup='this.blur()'></td>
    <td><input type='text' name='prevbal' value='" . $row['prevbal'] . "'></td>
    <td><input type='text' name='misc' value='" . $row['misc'] . "'></td>
    <td><input type='text' name='tentpay' value='" . $row['tentpay'] . "'></td>
    <td><input type='text' name='hudpay' value='" . $row['hudpay'] . "'></td>
    <td><input type='text' name='datepaid' value='" . $row['datepaid'] . "'></td>
    <td><input type='text' name='comments' value='" . $row['comments'] . "'></td>
    </tr>";

     
  2. FusionLord

    FusionLord

    Joined:
    Jan 24, 2009
    Messages:
    91
    Yes, Add the ' Width="##px" ' tag to your input boxs and mess with the pixel values till you get what you like or add ' <br /> between them so there is a line brake in between them.

    ~FusionLord~
     
  3. ckdoublenecks

    ckdoublenecks Thread Starter

    Joined:
    May 28, 2009
    Messages:
    112
    thanks, I just added size to the inputs
     
  4. FusionLord

    FusionLord

    Joined:
    Jan 24, 2009
    Messages:
    91
    Okay, Please mark as Solved.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/947810