Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

Click here to join us on IRC (#charas on irc.freenode.net)!



  • Charas-Project »
  • Off-Topic »
  • Archive »
  • Really Old Stuff »
  • HTML & DHTML (Moderator: De KoFfieŠ) »
  • Tables
« previous next »
  • Print
Pages: [1]

Author Topic: Tables  (Read 4866 times)

Offline golden_sun

  • Dark Lord of Myzan
  • Initiate
  • *
  • Posts: 5
  • The most active poster around of course!
    • My googlepages site
Tables
« on: September 17, 2003, 02:00:28 AM »
Whats the exact code for making tables? I've always had a hard time remembering the code for this bugger, and Ihaven't really played around with tables in awhile, and I need you members to help me refresh my memory..
Logged

Offline Alex

  • I am the MASTER!
  • Administrator
  • Exemplar
  • *
  • Posts: 1,130
(No subject)
« Reply #1 on: September 18, 2003, 12:18:28 AM »
Simple: just consider the most used tags (table, tr, td and th).
All the table is enclosed within and

every row is enclosed within and
And finally, every cell is whithin or

So, a valid table is:








1st2nd
FirstSecond


General rules:
- every TR has to contain the same number of TD or TH
- TD is normal text and left aligned
- TH is bold text and centered
- if you want one TD (TH) to fill more cells horizontally, use colspan
- if you want one TD (TH) to fill more cells vertically, use rowspan

Basic properties for table tag:
align (left, center, right)
valign (bottom, middle, top)
width (in pixels or %)
border (in pixel, the width of the border. 0 means no border)
cellpadding (in pixels, the space between data and border)
cellspacing (in pixels, the spache between cells (TD or TH))

Basic properties for tr tag (if set, will be applyed to all the row):
align (left, center, right)
valign (bottom, middle, top)

Basic properties for td-th tags:
align (left, center, right)
valign (bottom, middle, top)
width (in pixels or %, relative to the table)

So, here we have a more complex example:
Test it, it will be more useful trying to understand this than reading tons of books! ;)


   
      
   
   
      
      
      
   
   
      
      
   
   
      
   
   
      
   
   
      
   
   
      
   
   
      
   
THIS IS THE TITLE!!!!
1st cell2nd cell3rd cell
AndBut
why
SO
Long???
now
a
long
vertical
thing

Logged

Offline golden_sun

  • Dark Lord of Myzan
  • Initiate
  • *
  • Posts: 5
  • The most active poster around of course!
    • My googlepages site
(No subject)
« Reply #2 on: September 20, 2003, 07:28:09 PM »
yeah, this is part of the reason I have a hard time with tables, they're more complex than the average html..I'll have to find a place where I can test it first though..and I know just the place..
Logged

Offline Alex

  • I am the MASTER!
  • Administrator
  • Exemplar
  • *
  • Posts: 1,130
(No subject)
« Reply #3 on: September 24, 2003, 05:57:01 PM »
Well, to test it all you need is notepad and a browser ;)
Logged

Offline HiSenshi

  • Member
  • Initiate
  • *
  • Posts: 2
Tables...
« Reply #4 on: October 22, 2003, 04:00:37 PM »
You can also change the background color or image, stretch the cel as wide as you need, and change the table to suit your content. Here's some extras you can put in to the and
cel tags:

border="#" - This will allow you to change the border width around the table. The number it reads is in pixels.

bgcolor="#FFFFFF" - this will change the background color of the table/cell when you type it in the tag. The number is a six-digit code that the browser can read as a color. The one shown is white.

width="#" - this tag will specifyt how wide the table/cel is. It can be read as either pixels or a percentage, depending on whether you place the % sign at the end of the number.

These are just a few that might be able to help you get started. They're pretty basic, but if you use them right, the page can look just the way you want it to. border only works in the table tag, though. I hope this helps you some, Ja ne!
Logged
"May the forces of evil feel the thorns of the White Rose." - Ryu Tomodachi

Offline Whiteknight

  • Member
  • Initiate
  • *
  • Posts: 4
(No subject)
« Reply #5 on: January 06, 2004, 11:55:27 PM »
Personally i wold not use a tabel some browsers wont get the code right and it will look weird.BUT thats my opinion :frag:  >:
Logged

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Off-Topic »
  • Archive »
  • Really Old Stuff »
  • HTML & DHTML (Moderator: De KoFfieŠ) »
  • Tables
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum