Search the web
Sign In
New User? Sign Up
BbshopWebGuild · Barbershop Webmasters Guild
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
centering tables   Message List  
Reply | Forward Message #876 of 912 |
I've been searching for code that will allow changes to one table not
effect the adjacent side by side one and finally found this codes that
does that!

<div style="width:970px; vertical-align:top;">

<div style="width:485px; float:left;"><table
width="100%"><tr><td>Table 1</td></tr></table><table
width="100%"><tr><td>Table 2</td></tr></table></div>

<div style="width:485px; float:right;"><table
width="100%"><tr><td>Table 3</td></tr></table></div>

<br style="clear:both;" />

</div>



But I can't figure how to get it to center on the page, right now the
tables align to the left of the page. Any ideas?

http://greatlakeschorus.org/Troubadour10.html

Michael Baribeau
Webmaster@...
http://GreatLakesChorus.org
Grand Rapids, MI



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Troubadour</title>
</head>
<body
style="color: rgb(0, 0, 0); background-color: rgb(51, 51, 255);"
alink="#000099" link="#000099" vlink="#990099">
<div style="text-align: center;">&nbsp; <br>
</div>
<table
style="background-color: White; width: 970px; text-align: left;
margin-left: auto; margin-right: auto;"
border="1" cellpadding="10" cellspacing="0">
<tbody>
<tr>
<td colspan="6" align="center" valign="top"><img
style="height: 169px; width: 970px;" alt="Troubadour Title"
src="troubsign2.JPG" align="middle"></td>
</tr>
<tr style="font-weight: bold; color: rgb(255, 255, 255);">
<td colspan="6"
style="vertical-align: top; text-align: center; background-color:
rgb(255, 255, 255);"><big
style="font-family: Helvetica,Arial,sans-serif;"><big><span
style="background-color: rgb(51, 51, 255);">&nbsp;
&nbsp; &nbsp; &nbsp;<small><big>Barbershop
Harmony&nbsp;Society's Pioneer Distict News for Michigan &amp;
Ontario</big></small>&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; </span></big></big><br>
</td>
</tr>
<tr align="center">
<td colspan="6" valign="top"><big
style="font-style: italic;"><span
style="font-weight: bold;"><big>January 2008</big>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </span></big><big style="font-style: italic;"><span
style="font-weight: bold;"></span></big><big
style="font-family: Helvetica,Arial,sans-serif;"><a
href="http://GreatLakesChorus.org">Archive</a> | <a
href="http://GreatLakesChorus.org">Contact</a>
|&nbsp;<a href="http://GreatLakesChorus.org">Submissions</a></big><big
style="font-style: italic;"><span
style="font-weight: bold;"> &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
&nbsp; &nbsp; <big>Online Edition #1</big></span></big><big><span
style="font-weight: bold;"></span></big></td>
</tr>
</tbody>
</table>
<div style="text-align: center;"><br>
<div style="width: 970px; vertical-align: top;">
<div style="width: 485px; float: left;">
<table
style="width: 100%; text-align: left; margin-left: auto;
margin-right: auto;"
cellpadding="10">
<tbody>
<tr>
<td style="background-color: rgb(255, 255, 255);">Table
1</td>
</tr>
</tbody>
</table>
<table
style="width: 100%; text-align: left; margin-left: auto;
margin-right: auto;"
cellpadding="10">
<tbody>
<tr>
<td style="background-color: rgb(255, 255, 255);">Table
2</td>
</tr>
</tbody>
</table>
</div>
<div style="width: 485px; float: right;">
<table
style="width: 100%; text-align: left; margin-left: auto;
margin-right: auto;"
cellpadding="10">
<tbody>
<tr>
<td style="background-color: rgb(255, 255, 255);">Table
3</td>
</tr>
</tbody>
</table>
</div>
<br style="clear: both;">
</div>
<br>
<br>
</div>
<br>
<br>
</body>
</html>





Thu Nov 15, 2007 4:58 pm

michaelbaribeau
Offline Offline
Send Email Send Email

Forward
Message #876 of 912 |
Expand Messages Author Sort by Date

I've been searching for code that will allow changes to one table not effect the adjacent side by side one and finally found this codes that does that! <div...
Michael Baribeau
michaelbaribeau
Offline Send Email
Nov 15, 2007
4:58 pm

... This seemed to work: http://www.thescripts.com/forum/thread100046.html Basically you need to put "margin-left: auto; margin-right: auto;" to the first div...
Jerome Gobuyan
gobuyanjer
Offline Send Email
Nov 15, 2007
6:37 pm

Michael, note the style in the table <td Style.> copy this to your editor and note the text is now centered in each cell. I turned on the border for one of...
Stephen Volkmann
fenioustrader
Offline Send Email
Nov 15, 2007
11:49 pm

Just to clarify, the margin style definitions go into the outer <div> tag, The outer <div> container is what gets centered relative to the page. The inner...
Jerome Gobuyan
gobuyanjer
Offline Send Email
Nov 16, 2007
5:16 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help