Is it possible to position tables side-by-side using CSS?Float the first one?
Sorry, need to know more about the situation to provide a meaningful example... are they fixed width, are they fluid, what's the story with them?Hi there wood_tah,
here is an example...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>side-by-side tables</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<style type="text/css">
/*<![CDATA[*/
#one,#two {
border:solid 1px #000;
margin:10px;
float:left;
}
#one td {
width:324px;
height:200px;
border:solid 1px #000;
text-align:center;
background:#eef;
}
#two td {
width:162px;
height:100px;
border:solid 1px #000;
text-align:center;
background:#fee;
}
/*//]]>*/
</style>
</head>
<body>
<table id="one"><tr>
<td>table one</td>
</tr></table>
<table id="two"><tr>
<td>table two</td>
</tr></table>
</body>
</html>
cootheador display:inline;
Sorry, need to know more about the situation to provide a meaningful example... are they fixed width, are they fluid, what's the story with them?Hi there wood_tah,
here is an example...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>side-by-side tables</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<style type="text/css">
/*<![CDATA[*/
#one,#two {
border:solid 1px #000;
margin:10px;
float:left;
}
#one td {
width:324px;
height:200px;
border:solid 1px #000;
text-align:center;
background:#eef;
}
#two td {
width:162px;
height:100px;
border:solid 1px #000;
text-align:center;
background:#fee;
}
/*//]]>*/
</style>
</head>
<body>
<table id="one"><tr>
<td>table one</td>
</tr></table>
<table id="two"><tr>
<td>table two</td>
</tr></table>
</body>
</html>
cootheador display:inline;