| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| website maker - centre align coloums? | |
|---|---|
| Tweet Topic Started: Aug 16 2011, 11:40 AM (1,464 Views) | |
| kevsrfc | Aug 16 2011, 11:40 AM Post #1 |
|
Member
![]() ![]() ![]()
|
Hi, Please refer to the enclosed screengrab and advise how I can centrally align all of the columns apart from the leftmost one. Is there some aspect of the theme CSS which is over-riding the alignment in the HTML code as it looks ok to me ??? Here's my HTML code ... <HTML><HEAD><TITLE>Stats</TITLE></HEAD><BODY> <TABLE border="1" WIDTH="100%"> <CAPTION><B>Stafford Rangers FC - Season 2011/12 Player Statistics</B></CAPTION> <COLGROUP WIDTH="40%"></COLGROUP> <COLGROUP ALIGN="CENTER" WIDTH="10%" SPAN=6></COLGROUP> <TR><TH rowspan="2"><TH colspan="2">LEAGUE<TH colspan="2">CUP<TH colspan="2">TOTAL <TR><TH>games<TH>goals<TH>games<TH>goals<TH>games<TH>goals <TR><TD>Glyn Blackhurst <TD>1<TD>0<TD>0<TD>0<TD>1<TD>0 .... snip (loads of lines similar to the above two) .... </TABLE></BODY></HTML> <--click to enlarge
Edited by Helena, Aug 31 2011, 12:16 AM.
|
![]() |
|
| Liam | Aug 30 2011, 10:57 AM Post #2 |
![]()
~
![]()
|
I'm not expert with HTML, but I simply added <center> before each individual field and it worked for me. I know it is requires more effort and will increase the size of the code quite significantly, but it works! Liam |
![]() |
|
| Helena | Aug 31 2011, 12:13 AM Post #3 |
![]()
M is for Mod
![]()
|
you can center those columns by adding this bit of code to either the top or bottom of your web page:
|
![]() |
|
| Quozzo-ZNS | Aug 31 2011, 03:00 AM Post #4 |
![]()
Member
![]() ![]() ![]() ![]()
|
The <centre> tag is depreciated (although every browser still knows what it does, it won't validate, if your bothered about that) so i would use Helena's code. |
![]() |
|
| Minato-ZNS | Sep 7 2011, 06:55 PM Post #5 |
|
Someday the Dream Will End
![]() ![]() ![]() ![]() ![]()
|
The only problem with that is that it'll center everyone of the tables that have a TD or a TH in them. For the snippet that was presented, put align="center" after every TD or TH that you want centered. This way, it doesn't do anything to the rest of the forums. |
![]() |
|
| Helena | Sep 7 2011, 09:01 PM Post #6 |
![]()
M is for Mod
![]()
|
It would do that if the snippet (without style tags) was added to the main CSS of the board. But since this is on a ZB webpage, it won't affect the forums, only the coding on the web page. Adding it to the webpage will make it affect the table cells on the webpage only. It will center the text in all columns except the first one, which I believe is what the user requested, and it works on a test board. |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · ZetaBoards - Theme & Code Support · Next Topic » |





![]](http://z1.ifrm.com/static/1/pip_r.png)









8:41 PM Jul 10