Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Positioning Tables

Reply
Thread Tools

Positioning Tables

 
 
chrisdude911
Guest
Posts: n/a
 
      04-28-2006
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

 
Reply With Quote
 
 
 
 
Sid Ismail
Guest
Posts: n/a
 
      04-28-2006
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


 
Reply With Quote
 
 
 
 
chrisdude911
Guest
Posts: n/a
 
      04-28-2006
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>

 
Reply With Quote
 
chrisdude911
Guest
Posts: n/a
 
      04-28-2006
and it is the
that i want to align so that it is next to the main picture

 
Reply With Quote
 
Sid Ismail
Guest
Posts: n/a
 
      04-28-2006
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


 
Reply With Quote
 
chrisdude911
Guest
Posts: n/a
 
      04-28-2006
nope still doesn't work

 
Reply With Quote
 
Martin Jay
Guest
Posts: n/a
 
      04-28-2006
In message < .com>,
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Positioning Tables... westsidesally@gmail.com HTML 6 12-11-2006 03:54 AM
Tables within tables Otuatail HTML 7 08-02-2004 04:42 AM
Coordinates of divs and tables without absolute positioning? Siegfried Heintze Javascript 1 05-01-2004 10:19 PM
Text after 2 tables actually appears between 2 tables ! Peter Bassett HTML 3 08-15-2003 06:46 PM
Re: css positioning vs. tables PeterMcC HTML 0 06-23-2003 04:45 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57