 |
HTML Help Please Search for the answer to your question before asking it! Thanks.
|
| View previous topic :: View next topic |
| Author |
Message |
Samuel Jong
Joined: 06 Jan 2008
Posts: 113
|
| Posted: Sat Sep 19, 2009 2:17 am Table Not In The Center |
|
|
I try to use the below codes, but found the table not in the center.
Please advise.
Here are the codes:
<TABLE align=center>
<TBODY>
<TR>
<TD width=750 align=middle>
<TABLE border=5 cellSpacing=0 borderColor=blue cellPadding=0 width=750 background=http://www.sinhoa.org/panorama/Image-45.jpg align=center height=450>
<TBODY>
<TR>
<TD>
<CENTER>
<DIV style="FILTER: shadow(color=darkgreen); LINE-HEIGHT: 110%; WIDTH: 100%; FONT-FAMILY: stliti; COLOR: lime; FONT-SIZE: 50pt" font>Pakon</FONT></DIV></CENTER><BR><BR><BR><BR>
<CENTER>
<DIV style="FILTER: shadow(color=blue); LINE-HEIGHT: 110%; WIDTH: 100%; FONT-FAMILY: stliti; COLOR: cyan; FONT-SIZE: 40pt" font>Thanks For Sharing</FONT></DIV></CENTER></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE> |
|
|
sticks464
Joined: 31 Dec 2006
Posts: 2624
|
| Posted: Sat Sep 19, 2009 3:47 am |
|
|
Give the table you want to center a class, then use margins to center. Any object you want to center must have a width declared.
Code: <TABLE class="anyname" border=5 cellSpacing=0 borderColor=blue cellPadding=0 width=750 background=http://www.sinhoa.org/panorama/Image-45.jpg align=center height=450>
Code: .anyname {
margin:0 auto;
}
If it is a background you are trying to center you can do the same thing except put the image path in the css and not the html
Code: <TABLE class="anyname" border=5 cellSpacing=0 borderColor=blue cellPadding=0 width=750 align=center height=450>
Code: .anyname {
background:url(http://www.sinhoa.org/panorama/Image-45.jpg);
}
When centering children elements inside a parent element, the parent must also have a width declared. |
|
|
Samuel Jong
Joined: 06 Jan 2008
Posts: 113
|
| Posted: Sat Sep 19, 2009 1:02 pm |
|
|
Actually below are the codes embeded to the forum, but I don't know why it changed as the above:
<table align="center"><tr><td align="center" width="750"><table align="center" border=5 bordercolor=blue width="750" height="450" cellpadding="0" cellspacing="0" background="http://www.sinhoa.org/panorama/Image-45.jpg">
<tbody><tr><td><center><div font style="font-size: 50pt; filter: shadow(color=darkgreen); width: 100%; color: lime; line-height: 110%; font-family: stliti">Pakon</font></div></center><br><br><br><br><center><div font style="font-size: 40pt; filter: shadow(color=blue); width: 100%; color: cyan; line-height: 110%; font-family: stliti">Thanks For Sharing</font></div></center></td></tr></tbody></table></td></tr></table> |
|
|
sticks464
Joined: 31 Dec 2006
Posts: 2624
|
| Posted: Sat Sep 19, 2009 3:57 pm |
|
|
Are you trying to center a table or a background image?
The code I gave will center a table, div, object etc. |
|
|
Samuel Jong
Joined: 06 Jan 2008
Posts: 113
|
| Posted: Sat Sep 19, 2009 7:46 pm |
|
|
| Both to be centered in the forum. How to send the image to you? So you can see that the table not in the center. |
|
|
| |
|
|
|
Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group
|