Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 02-10-2009, 07:26 AM   #1 (permalink)
Saxon's Avatar
 

Join Date: Feb 2007

Posts: 6,362

Saxon is just really niceSaxon is just really niceSaxon is just really niceSaxon is just really nice

Default HTML tables question.

Hi guys,
It's been a while since I have had to do anything in HTML with tables and I am a little rusty essentially what I am after is a way to make the outline of the table coloured so it fits in with the basic style of the rest of the site.
Cheers, Chris.
__________________
I am not here for long I am deploying soon so please don't expect anything long winded.

Saxon is offline  
Old 02-10-2009, 08:21 AM   #2 (permalink)
Baez's Avatar
 

Join Date: Sep 2005

Location: Toronto, Canada

Posts: 5,469

Baez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of light

Default Re: HTML tables question.

Code:
<table border="2" bordercolor="#000088">
or

Code:
<table border="2" bordercolorlight="#0000bb" bordercolordark="#000077">

__________________

Baez is offline  
Old 02-10-2009, 12:38 PM   #3 (permalink)
Saxon's Avatar
 

Join Date: Feb 2007

Posts: 6,362

Saxon is just really niceSaxon is just really niceSaxon is just really niceSaxon is just really nice

Default Re: HTML tables question.

Thanks, Chris it's been so long since I did anything in HTML.
__________________
I am not here for long I am deploying soon so please don't expect anything long winded.

Saxon is offline  
Old 02-10-2009, 01:00 PM   #4 (permalink)
Baez's Avatar
 

Join Date: Sep 2005

Location: Toronto, Canada

Posts: 5,469

Baez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of light

Default Re: HTML tables question.

Yeah no problem mate. I only know it because it's still mandatory in my college.
__________________

Baez is offline  
Old 02-10-2009, 01:13 PM   #5 (permalink)
surgeVel's Avatar
 

Join Date: Feb 2008

Location: Fort Wayne, IN

Posts: 2,150

surgeVel will become famous soon enoughsurgeVel will become famous soon enough

Send a message via AIM to surgeVel
Default Re: HTML tables question.

Quote:
Originally Posted by Baez View Post
Yeah no problem mate. I only know it because it's still mandatory in my college.
HTML is mandatory? Weird... I know enough HTML to get by from doing web editing and such, but I've never learned how to do a web page from scratch with it. I usually grab a template and I just know how to edit things where I need them.
__________________

If I was helpful, please click the icon on the left hand side of this message that looks like a check mark Thanks!

Sig courtesy of Baez =)
surgeVel is offline  
Old 02-10-2009, 01:23 PM   #6 (permalink)
Baez's Avatar
 

Join Date: Sep 2005

Location: Toronto, Canada

Posts: 5,469

Baez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of light

Default Re: HTML tables question.

Yep the course is called INT222 taken in the 2nd semester of 8. Purely XHTML.
__________________

Baez is offline  
Old 02-10-2009, 04:00 PM   #7 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,686

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: HTML tables question.

Using the borders like that, in my opinion, looks crappy and doesn't look the same on all browsers.

Here is another approach that I think looks a lot better.

Code:
<style type="text/css">
.table-border { background:#ff0000; }
.row { background:#000;color:#fff; }
</style>

<table border="0" cellspacing="0" cellpadding="0" width="500px">
<tr><td class="table-border">
<table border="0" cellspacing="1" cellpadding="2" width="100%">
<tr>
<td class="row">table data here</td>
<td class="row">more stuff here</td>
</tr>
</table>
</td></tr>
</table>
.table-border is, as you probably guessed, the table border color. In my example it is red.

.row is the background of the cells. In my example it is black, with white text. In this method, you have to set the background color of each cell because otherwise it will be the same color as the border color. But, it looks better and is consistent on other browsers.

EDIT: Also, the 'cellspacing="1"' on the second table controls the width of the border in px.
__________________

Need website help? PM me!

Last edited by CrazeD; 02-10-2009 at 04:02 PM.
CrazeD is offline  
Old 02-10-2009, 05:49 PM   #8 (permalink)
oldskool's Avatar
 
Electrical Systems Design

Join Date: Jun 2008

Location: Maine, USA

Posts: 1,646

oldskool has a spectacular aura aboutoldskool has a spectacular aura about

Default Re: HTML tables question.

Craze,

Is that an internal CSS ? Just curious, because I dont see a link to an external.
__________________
  • Operating system(s) : Windows 7 Home Premium x64 | Ubuntu 9.10
  • CPU : Pentium Dual-Core E5200 @ 2.50GHz /Socket 775 LGA
  • Memory: 2X 2GB DDR2 SDRAM
  • Hard drive: 640 GB Western Digital Caviar Blue 7200rpm WD6400AAKS-75
  • Motherboard : Dell 0U880P
  • Video: nVidia GeGorce 8400GS
  • Chipset : Intel G41

<<<<< If you found anything I said helpful, please click the or under my avatar
oldskool is offline  
Old 02-10-2009, 05:54 PM   #9 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,686

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: HTML tables question.

Code:
<style type="text/css">
.table-border { background:#ff0000; }
.row { background:#000;color:#fff; }
</style>
Did you miss this part?

Yes it's internal.
__________________

Need website help? PM me!
CrazeD is offline  
Old 02-11-2009, 08:40 PM   #10 (permalink)
oldskool's Avatar
 
Electrical Systems Design

Join Date: Jun 2008

Location: Maine, USA

Posts: 1,646

oldskool has a spectacular aura aboutoldskool has a spectacular aura about

Default Re: HTML tables question.

Well actually I am new to CSS in my current class, and I was too lazy to go look at the text book. But thanks
__________________
  • Operating system(s) : Windows 7 Home Premium x64 | Ubuntu 9.10
  • CPU : Pentium Dual-Core E5200 @ 2.50GHz /Socket 775 LGA
  • Memory: 2X 2GB DDR2 SDRAM
  • Hard drive: 640 GB Western Digital Caviar Blue 7200rpm WD6400AAKS-75
  • Motherboard : Dell 0U880P
  • Video: nVidia GeGorce 8400GS
  • Chipset : Intel G41

<<<<< If you found anything I said helpful, please click the or under my avatar
oldskool is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tables - I hate Tables objecterror Web Graphics, Design, Digital Images 5 09-19-2008 07:13 PM
Thermal Paste Question Higach Overclocking, Case Mod, Tweaking PC Performance 8 01-05-2008 12:48 AM
Rivatuner Question Drewser Overclocking, Case Mod, Tweaking PC Performance 2 11-28-2007 03:40 PM
New computer, tell me what you think! and one little question too rgoldberg1 Building, Buying, or Upgrading High Performance PC Systems 3 11-12-2007 10:19 PM
Power Supply Question + Overclocking Question Grievearz Building, Buying, or Upgrading High Performance PC Systems 21 09-12-2007 12:59 AM