Click to See Complete Forum and Search --> : 2 tables side by side
Lagon
10-23-2005, 08:49 PM
i have no idea how to put a table near a table like
<table> <table>
all i can do is:
<table>
<Table>
might be a dumb question :/ thanx
bathurst_guy
10-23-2005, 09:53 PM
have you searched this forum, i have answered this question at least twice.
chazzy
10-23-2005, 10:05 PM
you need nested tables if that's what you really want to do. you might want to research CSS and div layouts.
<table><tr><td><table 1></td><td><table 2></td></tr></table>
ray326
10-23-2005, 10:54 PM
You can either style the tables display:inline or float them. Nesting them inside another table is not a good idea from a semantic standpoint.
the tree
10-24-2005, 04:46 AM
I'd go with floating.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Page Title</title>
<style type="text/css">
table.mini{
float: left;
margin: 20px;
}
</style>
</head>
<body>
<table class="mini"><tr><td>A</td><td>B</td></tr><tr><td>C</td><td>D</td></tr></table>
<table class="mini"><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>
</body>
</html>
davidbrent
10-24-2005, 08:22 AM
Remember to clear your floats. :)
JuliePgh
10-24-2005, 10:14 AM
You can either style the tables display:inline or float them. Nesting them inside another table is not a good idea from a semantic standpoint.
What is "wrong" with nesting? I'm not sure what you meant by a "semantic standpoint." Thanks
fab0990
10-24-2005, 10:36 AM
why dont you use one table with 2 collums?
the tree
10-25-2005, 06:11 AM
What is "wrong" with nesting? I'm not sure what you meant by a "semantic standpoint." Thanks The containing table would not be describing tabular data. The point of markup as a whole is to desribe it's content: p describes paragraphs, ul describes an unordered list.
If it's not describing it's contents acurately then different browsers (particuarly text-based) and spiders (like GoogleBot) wont be so happy. Tables take rather a lot of HTML, especially if a lot of the pages are to have similar layouts, you save a lot by using an external style sheet.
Why tables for layout is stupid (http://hotdesign.com/seybold/) Why avoiding tables (for layout) is important (http://davespicks.com/essays/notables.html) Tables or CSS: choosing a layout (http://evolt.org/article/Tables_or_CSS_Choosing_a_layout/25/21429/) Why go table free? (http://www.workingwith.me.uk/tablefree/why/) Tables vs. CSS: A fight to the death (http://www.sitepoint.com/article/tables-vs-css/) Why Tables Are Bad (For Layout) Compared to Semantic HTML + CSS (http://www.phrogz.net/CSS/WhyTablesAreBadForLayout.html) The layout is dead, long live the layout (http://www.westciv.com/style_master/house/good_oil/dead_layout/)