I want to make my site: http://www.idesigncircuit4u.exofire.net/ go in a column up the middle of the page. I think I have to use CSS but I can't work out how to do it. Can anyone help me?
<div align="left"><div align="center">
your site
<div align="right"></div></div></div>
<div align="left"><div align="center"><table cellpadding="12" cellspacing="12" bgcolor="#000000">
<tr><td width="690" bgcolor="#d3d3d3">
your site
</td></tr></table>
<div align="right"></div></div></div>
body
{
margin-left: 100px;
margin-right: 100px;
margin-top: 10px;
margin-bottom: 10px;
}
A much easier way to do that is to put margins around the body's left and right sides. Copy this code into your CSS file and adjust the measurements.
HTML:body { margin-left: 100px; margin-right: 100px; margin-top: 10px; margin-bottom: 10px; }
<table align="center" cellpadding="5" celspacing="0" class="mainpage">
<tr>
<td>
Your Site
</td>
</tr>
</table>
table.mainpage
{
margin: 20px 5px 20px 5px;
background-color: #000000;
text-align: center;
height: 100%;
width: 100%
}
table.mainpage td
{
background-color: #FFFFFF;
text-align: center;
}
IE and Firefox read nested DIV tags differently. Try this:
and in your CSS file:HTML:<table align="center" cellpadding="5" celspacing="0" class="mainpage"> <tr> <td> Your Site </td> </tr> </table>
Adjust the measurements. Hope it worksHTML:table.mainpage { margin: 20px 5px 20px 5px; background-color: #000000; text-align: center; height: 100%; width: 100% } table.mainpage td { background-color: #FFFFFF; text-align: center; }
style="text-align: center; vertical-align: top;"
<table align="center" cellpadding="5" cellspacing="0" class="mainpage">
<tr>
<td>
Your Site
</td>
</tr>
</table>
table.mainpage
{
margin: 20px 5px 20px 5px;
background-color: #000000;
text-align: center;
}
table.mainpage td
{
background-color: #FFFFFF;
text-align: center;
vertical-align: top;
margin: 5px;
}
Thank you for the credits
Try adding this as an attribute to the TD tag:
Also if you try this, it will work like dirtracer36's idea.HTML:style="text-align: center; vertical-align: top;"
and in the CSS file:HTML:<table align="center" cellpadding="5" cellspacing="0" class="mainpage"> <tr> <td> Your Site </td> </tr> </table>
Adjust measurements accordingly. Nice website and amazing use of JavaScriptHTML:table.mainpage { margin: 20px 5px 20px 5px; background-color: #000000; text-align: center; } table.mainpage td { background-color: #FFFFFF; text-align: center; vertical-align: top; margin: 5px; }