By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,226 Members | 1,353 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,226 IT Pros & Developers. It's quick & easy.

Table alignment question

P: n/a
Hello,

I'm sure your all tired of these "alignment" question, but please
endure mine.

Question. Simple put: What makes a table sit beside another table, as
oppose to going down below it.

Here's my example ...
<html>
<head>
</head>
<body>
<table><tr><td>Table 1, Row 1, Cell 1</td></tr></table>
<table><tr><td>Table 2, Row 1, Cell 1</td></tr></table>
</body>
</html>

This simple two table page displays the tables "stacked". However, if
I add an alignment (align="left") to table 1, then table two comes up
beside table one, as in...

<table align="left"><tr><td>Table 1, Row 1, Cell 1</td></tr></table>
<table><tr><td>Table 2, Row 1, Cell 1</td></tr></table>

Why does this happen, and what is the general rule? Would appreciate
comments, and any links to trainers/tutorials which might have good
explaination of layout issues (this is a layout issue?).

Cheers and thanks,
Eric
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Eric <news:fd**************************@posting.google. com>:
Question. Simple put: What makes a table sit beside another
table, as oppose to going down below it.
Different things, including putting two tables within the same
row of a parent table;-)
Here's my example ...
<table><tr><td>Table 1, Row 1, Cell 1</td></tr></table>
<table><tr><td>Table 2, Row 1, Cell 1</td></tr></table>

This simple two table page displays the tables "stacked".
This is normal as tables are block level elements and blocks are
generally given a break before and after them.
However, if I add an alignment (align="left") to table 1, then
table two comes up beside table one, as in...

<table align="left"><tr><td>Table 1, Row 1, Cell
1</td></tr></table> <table><tr><td>Table 2, Row 1, Cell
1</td></tr></table>

Why does this happen, and what is the general rule?


http://htmlhelp.com/reference/html40/tables/table.html

Read about the align attribute near the bottom of the page. If
the table is treated as a floating element then the following
content gets wrapped around it.

--
Rob - http://rock13.com/
Web Stuff: http://rock13.com/webhelp/
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.