Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
Table Colors in Webpages; How do I change the colors? >_<
Topic Started: Nov 30 2007, 04:44 PM (571 Views)
badtzmaru
Member Avatar
Member
[ *  *  * ]
I'm putting all sorts of tables on my webpages and while I'm satisfied with the nice default colors, I was wondering if I could change the border colors and background colors for some of them.

I tried bordercolor="red" and bgcolor="red" in the <table> tags to no avail. :(

Thank you for your time in advance!
Offline Profile Quote Post Goto Top
 
RyuraGS
Member Avatar
Member
[ *  *  * ]
You need to use CSS.

<table style=""></table>
There's tons that can go in there. http://www.w3schools.com/css/ is a pretty good reference for everything that you can do.
Offline Profile Quote Post Goto Top
 
badtzmaru
Member Avatar
Member
[ *  *  * ]
Thanks for replying! :) Hmm, is there a way to edit just one particular table's border color straight into the HTML without having to make a second default table in the CSS? >_< (I hope that makes sense...)
Offline Profile Quote Post Goto Top
 
Nicola
Darth Vader's Sewing Instructor
[ *  *  *  *  *  *  * ]
If I understand you correctly, sure, you just change the style properties:
Code: HTML
 
<table cellspacing="0" cellpadding="0" valign="top" style="background: #fff">....

Makes the table background white. If you wanted another table on the same page to have the background colour pink, you'd do the same and change the hex code.
Then you can style individual cells:
Code: HTML
 
<table cellspacing="0" cellpadding="0" valign="top" style="background: #fff">
<tr>
<td style="background: #000">....

The table is white, and a cell is now black.
Code: HTML
 
<table cellspacing="0" cellpadding="0" valign="top" style="background: #fff">
<tr>
<td style="background: #000">Cell Contents</td>
<td style="background: #ffc000">Cell Contents</td>
</tr>
</table>

A table with a white background, a black cell and a yellow cell.
Offline Profile Quote Post Goto Top
 
Eureka
Member
[ *  *  * ]
Woah! We have an HTML BBCode Tag now? Nice :)
Offline Profile Quote Post Goto Top
 
Nicola
Darth Vader's Sewing Instructor
[ *  *  *  *  *  *  * ]
Ken
Dec 1 2007, 05:36 PM
Woah! We have an HTML BBCode Tag now? Nice :)
No, you can use HTML in the Webpage maker.
Offline Profile Quote Post Goto Top
 
Eureka
Member
[ *  *  * ]
No no no. I mean the [html] tags in posts. I don't recall having that on IF.
Edited by Eureka, Dec 1 2007, 05:42 PM.
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
We didn't, we do now.
Offline Profile Quote Post Goto Top
 
badtzmaru
Member Avatar
Member
[ *  *  * ]
Thanks so much for your reply, Nicola!! :D

I'm still having trouble making the background color show up, though... >_< And, I'd also like to know how to change the border color. I'm only making tables with no real cells, but thank you for showing me those codes for future reference. :)

Anyway, this is the code that failed for me:
Code: HTML
 
<table style="background: #fff"><tr><td align="center">content</td></tr></table>

Here's my page I'm working on: http://s1.zetaboards.com/clazziquai/pages/youneverknow/ (It's the last table with the navigation links, all the way at the bottom. Sorry for the mess. :$ )
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Theme & CSS Help · Next Topic »
Add Reply