38 users online (0 members and 38 guests)  

Thread: table question


  Results 1 to 7 of 7

Related

  1. Table Question    Forum: HTML Forum
    Replies: 7
  2. Table Question    Forum: HTML Forum
    Replies: 11
  3. Yet another Table Question    Forum: HTML Forum
    Replies: 2
  4. Table question    Forum: HTML Forum
    Replies: 1
  5. Help with a stupid table question    Forum: HTML Forum
    Replies: 2
  1. #1
    brsdja's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2003
    Location
    Reading
    Posts
    16

    table question

    Urrm, soz, bit of a basic question

    I want to create a table with a fixed width. I got spacers in to stop it going below a certain size. But is there a way to stop the table expanding beyond a specific size?

    Jon

  2. #2
    xdeadd0llx's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Nov 2003
    Location
    Adelaide, Australia
    Posts
    25
    How do you usually code your tables?

    If you're asking what I think you're asking then I think this is probably what ur after?

    Code:
    <table width="400px" cellpading="0" cellspacing="0" border="0">
    <tr>
    <td>
    Stuff
    </td>
    </tr>
    </table>
    You fix the "width" attribute with how big you want it. You should always have it as a percentile (ie. 100% or 80%) or as "px" (ie. 200px, 500px etc). <td> tags can also have "width" attribute. This is basic..There's really so much else you need to know about tables and using them ...too much to go in to here, so, I suggest u do a google search and go to a beginners HTML tutorial - there's stacks of 'em - keep reading and keep practicing

  3. #3
    Enigma's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Nov 2000
    Posts
    426
    No need to search, there's table tutorials right here:

    http://www.ahfb2000.com/htmltables.php

  4. #4
    brsdja's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2003
    Location
    Reading
    Posts
    16
    yer, maybe I did not describe what I was asking very well. I know how to code a table.

    What I'm trying to do is have a number of tables underneath each other all of the same size (they have to be separate tables rather than just one).

    But I dont want the tables re-sizing themselves if the content in a cell is too big. I need each table to stay exactly the same size and line up with the ones above.

    So I guess what I'm asking is, is there a way to stop tables re-sizing when on a page?

    Jon
    Last edited by brsdja; 12-11-2003 at 05:39 PM.

  5. #5
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    can you show us a link to what you have so far.

    Dave

  6. #6
    brsdja's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2003
    Location
    Reading
    Posts
    16
    k, no link, but heres some example code. its a bit rough but should demonstrate what I'm trying to do... (I hope)!!

    <div id="Layer1" style="position:absolute; left:231px; top:87px; width:500px; height:497px; z-index:1; overflow: hidden;">
    <form name="form1" method="post" action="">
    <p>&nbsp;</p>
    <p><fieldset><legend>name</legend>
    <table width="300" border="0" cellpadding="0" cellspacing="0" class="tbl_border">
    <!--DWLayoutTable-->
    <caption>
    <span class="tbl_h1"> Registration </span>
    </caption>
    <tr>
    <th scope="col">xcvcxv</th>
    <th nowrap scope="col"><!--DWLayoutEmptyCell-->&nbsp;</th>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td height="1"><img src="spacer.gif" alt="" width="146" height="1"></td>
    <td><img src="spacer.gif" alt="" width="19" height="1"></td>
    </tr>
    </table>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </table>
    </fieldset>
    <fieldset>
    <legend>name</legend>
    <table width="300" border="0" cellpadding="0" cellspacing="0" class="tbl_border">
    <!--DWLayoutTable-->
    <caption>
    <span class="tbl_h1"> Registration </span>
    </caption>
    <tr>
    <th scope="col">&nbsp;</th>
    <th scope="col">cc</th>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td height="1"><img src="spacer.gif" alt="" width="146" height="1"></td>
    <td><img src="spacer.gif" alt="" width="19" height="1"></td>
    </tr>
    </table>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </fieldset>
    </p>
    <fieldset>
    <legend>name</legend>
    <table width="300" border="0" cellpadding="0" cellspacing="0" class="tbl_border">
    <!--DWLayoutTable-->
    <caption>
    <span class="tbl_h1"> Registration </span>
    </caption>
    <tr>
    <th scope="col">&nbsp;</th>
    <th scope="col">&nbsp;</th>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td height="1"><img src="spacer.gif" alt="" width="146" height="1"></td>
    <td><img src="spacer.gif" alt="" width="19" height="1"></td>
    </tr>
    </table>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </fieldset>
    <fieldset>
    <legend>name</legend>
    <table width="300" border="0" cellpadding="0" cellspacing="0" class="tbl_border">
    <!--DWLayoutTable-->
    <caption>
    <span class="tbl_h1"> Registration </span>
    </caption>
    <tr>
    <th scope="col">&nbsp;</th>
    <th scope="col">&nbsp;</th>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td height="1"><img src="spacer.gif" alt="" width="146" height="1"></td>
    <td><img src="spacer.gif" alt="" width="19" height="1"></td>
    </tr>
    </table>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </fieldset>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    </form>
    </div>

  7. #7
    Android's Avatar

    Status
    Offline
    Join Date
    Oct 2002
    Location
    I AM CANADIAN
    Posts
    440

    Invalid code could be a problem......

    Quote Originally Posted by brsdja
    k, no link, but heres some example code. its a bit rough but should demonstrate what I'm trying to do... (I hope)!!

    <div id="Layer1" style="position:absolute; left:231px; top:87px; width:500px; height:497px; z-index:1; overflow: hidden;">
    <form name="form1" method="post" action="">
    <p>&nbsp;</p>
    <p><fieldset><legend>name</legend>
    <table width="300" border="0" cellpadding="0" cellspacing="0" class="tbl_border">
    <!--DWLayoutTable-->
    <caption>
    <span class="tbl_h1"> Registration </span> <<<< can't put this here
    </caption>
    <tr>
    <th scope="col">xcvcxv</th>
    <th nowrap scope="col"><!--DWLayoutEmptyCell-->&nbsp;</th>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td height="1"><img src="spacer.gif" alt="" width="146" height="1"></td>
    <td><img src="spacer.gif" alt="" width="19" height="1"></td>
    </tr>
    </table>
    <<<<<< need to open table here
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </table>
    </fieldset> <<<<<<<<<<<<<<<<< "fieldset" and "legend" in
    <fieldset> <<<<<<<<<<<<<<<<< netscape 6.2 and up so
    <legend>name</legend> <<<<<< use with care.....
    <table width="300" border="0" cellpadding="0" cellspacing="0" class="tbl_border">
    <!--DWLayoutTable-->
    <caption>
    <span class="tbl_h1"> Registration </span>
    </caption>
    <tr>
    <th scope="col">&nbsp;</th>
    <th scope="col">cc</th>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td height="1"><img src="spacer.gif" alt="" width="146" height="1"></td>
    <td><img src="spacer.gif" alt="" width="19" height="1"></td>
    </tr>
    </table>
    <<<<<< need to open table here
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </fieldset>
    </p>
    <fieldset>
    <legend>name</legend>
    <table width="300" border="0" cellpadding="0" cellspacing="0" class="tbl_border">
    <!--DWLayoutTable-->
    <caption>
    <span class="tbl_h1"> Registration </span>
    </caption>
    <tr>
    <th scope="col">&nbsp;</th>
    <th scope="col">&nbsp;</th>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td height="1"><img src="spacer.gif" alt="" width="146" height="1"></td>
    <td><img src="spacer.gif" alt="" width="19" height="1"></td>
    </tr>
    </table>
    <<<<<< need to open table here
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </fieldset> <<<<<<<<<<
    <fieldset> |<<< same as above
    <legend>name</legend><<<
    <<<<<<<<<<<close table here
    <table width="300" border="0" cellpadding="0" cellspacing="0" class="tbl_border">
    <!--DWLayoutTable-->
    <caption>
    <span class="tbl_h1"> Registration </span>
    </caption>
    <tr>
    <th scope="col">&nbsp;</th>
    <th scope="col">&nbsp;</th>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td height="1"><img src="spacer.gif" alt="" width="146" height="1"></td>
    <td><img src="spacer.gif" alt="" width="19" height="1"></td>
    </tr>
    </table>
    <<<<<< need to open table here
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </fieldset>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    </form>
    </div>
    These errors might be giving you problems. IE is forgiving, but some browsers don't like incorrectly formed tables, (among other things ).



Tags for this Thread