IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Styling tables with CSS
Dan
post Jul 16 2008, 10:24 AM
Post #1


Crew member
***

Group: Administrators
Posts: 110
Joined: 24-April 08
Member No.: 2



A nice example of styling an HTML data table with CSS and background images. Tables can be pretty dull, but it's surprisingly easy to make them look just as nice as the rest of your content.

Please post any other examples of nice tables below.

Dan
Go to the top of the page
 
+Quote Post
jeffonfire
post Jul 19 2008, 02:09 AM
Post #2


Moderator
***

Group: Members
Posts: 150
Joined: 29-April 08
From: earth
Member No.: 18



Veerle's blog has some great content.
Go to the top of the page
 
+Quote Post
cool sam
post Nov 20 2008, 09:51 AM
Post #3


Newbie
*

Group: Members
Posts: 9
Joined: 19-September 08
Member No.: 233



Hi
Please go for css guide online





___________________________________________________

Computer Support | Network Management
Go to the top of the page
 
+Quote Post
Lizapotter
post Feb 25 2009, 07:20 AM
Post #4


Member
**

Group: Members
Posts: 19
Joined: 24-February 09
From: UK
Member No.: 5,326



Steps to style the border of table using CSS:

1. Create the table in your usual way. If your table uses columns to organize the data, use the HTML element th to create column headers. If your table uses rows to organize the data, use the HTML th element to create row headers.

2. Creating borders in CSS requires two rules in your CSS. With the first rule, you set a border for the outside of the table. You also set the border-collapse rule, so that you'll only have one border line between the table cells. (If you want double borders between the table cells, do not set the border-collapse property to collapse.) Here's an example rule:

table {
border-width: 1px;
border-style: solid;
border-color: #000000;
border-collapse: collapse;
}

3. Two CSS rules combine to create these borders. Two CSS rules combine to create these borders. Next, you add a border to the table header (th) and table data (td) cells in the table. If you used border-collapse: collapse on your table rule, there will be a single border line between cells. Here's an example rule:

th, td {
border-width: 1px;
border-style: solid;
border-color: #000000;
}

Note that the grouped selector th, td creates the same CSS rule for both the th and td elements.


--------------------
Go to the top of the page
 
+Quote Post
Ben
post Feb 25 2009, 09:11 AM
Post #5


Administrator
****

Group: Administrators
Posts: 679
Joined: 24-April 08
From: Chesterfield, UK
Member No.: 1



It'd be great to see examples of different table styles using CSS.

Here are 3 for starters from the work we've done at Scratchmedia:
Anyone have more?


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Save the Pixel If you like Scratch Web Design Forums, you'll love our new Web Design eBook.
“Save the Pixel - the Art of Simple Web Design” features loads of new content by Ben Hunt PLUS 21 new web site redesigns that show elegant simple design in action
Get it from SaveThePixel.org now for only £27 - instant delivery in PDF format!
RSS Lo-Fi Version Time is now: 9th September 2010 - 06:00 AM
Provided by Scratchmedia, Web Designers, London