Positioning Tables

Discussion in 'HTML' started by chrisdude911, Apr 28, 2006.

  1. chrisdude911

    chrisdude911 Guest

    Hi,
    I have a table that is next to a picture and i cannot seem to make it
    move to the top where the picture is. The picture in in the center and
    i would like the move my table to the top left.
    How would i do this?
    Thanks
    Chris
     
    chrisdude911, Apr 28, 2006
    #1
    1. Advertising

  2. chrisdude911

    Sid Ismail Guest

    On 28 Apr 2006 00:10:17 -0700, "chrisdude911"
    <> wrote:

    : Hi,
    : I have a table that is next to a picture and i cannot seem to make it
    : move to the top where the picture is. The picture in in the center and
    : i would like the move my table to the top left.
    : How would i do this?


    The default is top left for a table. Align the image instead.

    Use float:right, or the crude way of putting the image in another
    table, where the two tables are nested, then use valign=top for both
    TDs.

    Sid
     
    Sid Ismail, Apr 28, 2006
    #2
    1. Advertising

  3. chrisdude911

    chrisdude911 Guest

    here is my ccode

    <html>
    <head>
    <title>Pics</title>

    <style>
    ..small {height:100px;margin:2px;}
    ..large {height:600px;border:black 2px solid;}
    </style>

    <script type='text/javascript'>
    function toPicbox(x){
    document.getElementById('picbox').src = x.src;
    }
    </script>

    <div align="center">
    <img src='startempty.jpg' id="picbox" class='large'>
    </div>
    <style type="text/css">
    #imgbox {
    width: 300px;
    height: 1000px;
    overflow: auto;
    }
    </style>

    <div id="imgbox">
    <table border"2">
    <tr>
    <td><img src="guitar.jpg" class='small' onclick='toPicbox(this)'>
    </td>
    </tr>

    <tr><td><img src="startempty.jpg" class='small'
    onclick='toPicbox(this)'></td></tr>
    </table>
    </div>

    </body>
    </html>
     
    chrisdude911, Apr 28, 2006
    #3
  4. chrisdude911

    chrisdude911 Guest

    and it is the
    that i want to align so that it is next to the main picture
     
    chrisdude911, Apr 28, 2006
    #4
  5. chrisdude911

    Sid Ismail Guest

    On 28 Apr 2006 03:58:43 -0700, "chrisdude911"
    <> wrote:

    : and it is the
    : that i want to align so that it is next to the main picture
    :


    It's not the ideal case for using tables.

    Add "valign=top" in both TDs.

    Sid
     
    Sid Ismail, Apr 28, 2006
    #5
  6. chrisdude911

    chrisdude911 Guest

    nope still doesn't work
     
    chrisdude911, Apr 28, 2006
    #6
  7. chrisdude911

    Martin Jay Guest

    In message <>,
    chrisdude911 <> writes
    >nope still doesn't work


    How about something like this? It might put you on the right track.

    Also uploaded to:
    <http://www.spam-free.org.uk/pages/table_top.html>.

    <html>
    <head>
    <title>Pics</title>

    <style>
    ..small {height:100px;margin:2px;}
    ..large {height:600px;border:black 2px solid;}
    #imgbox {width: 300px;position:absolute;}
    ..centre {margin-left: 300px;text-align: center;}
    </style>
    <script type='text/javascript'>
    function toPicbox(x){
    document.getElementById('picbox').src = x.src;
    }
    </script>

    <div id="imgbox">
    <table border"2">
    <tr>
    <td><img src="guitar.jpg" class='small'
    onclick='toPicbox(this)'></td>
    </tr>
    <tr>
    <td><img src="startempty.jpg" class='small'
    onclick='toPicbox(this)'></td></tr>
    </table>
    </div>

    <div class="centre">
    <img src='startempty.jpg' id="picbox" class='large'>
    </div>

    </body>
    </html>

    --
    Martin Jay
     
    Martin Jay, Apr 28, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PeterMcC

    Re: css positioning vs. tables

    PeterMcC, Jun 23, 2003, in forum: HTML
    Replies:
    0
    Views:
    851
    PeterMcC
    Jun 23, 2003
  2. Peter Bassett
    Replies:
    3
    Views:
    931
    Augustus
    Aug 15, 2003
  3. Otuatail

    Tables within tables

    Otuatail, Jul 31, 2004, in forum: HTML
    Replies:
    7
    Views:
    498
  4. Replies:
    6
    Views:
    406
    dorayme
    Dec 11, 2006
  5. Siegfried Heintze
    Replies:
    1
    Views:
    107
    pcx99
    May 1, 2004
Loading...

Share This Page