Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning HTML, XHTML, CSS, and JavaScript
This is the forum to discuss the Wrox book Beginning HTML, XHTML, CSS, and JavaScript by Jon Duckett; ISBN: 978-0-470-54070-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning HTML, XHTML, CSS, and JavaScript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 4th, 2010, 04:01 PM
Registered User
 
Join Date: Apr 2010
Location: Planet Earth
Posts: 70
Thanks: 4
Thanked 0 Times in 0 Posts
Default HELP WITH TABLE BORDER!!!!

Hello everyone.
I am currently learning CSS. I created a style sheet for my web site, and one of the things I used CSS for was my table.
The CSS code created a border around my table. However, it didn't create a border around each individual cell. How can I accomplish this?
Here is my CSS code. The first one applies to the table heading, but I don't think that's relevant to my problem. Also, crew was just the name of my table. That's not important to my problem.
Code:
th {
font-weight:bold;
padding:5px;
font-size:25pt;
color:red;
text-decoration:blink;
font-family:Jokerman}

table.Crew {
border-style:outset;
border-width:5px solid;
border-color:gray}

EDIT: Never mind. I figured it out. You just need to use a td CSS.
Can a Wrox moderator delete this thread, since it's of no use?

Last edited by andypandyrox456; April 4th, 2010 at 04:07 PM..
Reply With Quote
  #2 (permalink)  
Old April 4th, 2010, 05:35 PM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

here is a simplest example, and there are lots that you can do with CSS:
Code:
<html>
<head>
<style>
table {
	border-style:outset;
	border-width:1px;
	border-color:red;
	border-spacing: 0px;
}
td {
	border-style:outset;
	border-color:red;
	border-width: 1px;
	padding: 10px;
}
</style>
</head>
<body>
<table>
<tr><td>foo</td><td>foo</td><td>foo</td></tr>
<tr><td>foo</td><td>foo</td><td>foo</td></tr>
<tr><td>foo</td><td>foo</td><td>foo</td></tr>
</table>
</body>
</html>
Reply With Quote
  #3 (permalink)  
Old April 4th, 2010, 06:10 PM
Registered User
 
Join Date: Apr 2010
Location: Planet Earth
Posts: 70
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by PeterPeiGuo View Post
here is a simplest example, and there are lots that you can do with CSS:
Code:
<html>
<head>
<style>
table {
	border-style:outset;
	border-width:1px;
	border-color:red;
	border-spacing: 0px;
}
td {
	border-style:outset;
	border-color:red;
	border-width: 1px;
	padding: 10px;
}
</style>
</head>
<body>
<table>
<tr><td>foo</td><td>foo</td><td>foo</td></tr>
<tr><td>foo</td><td>foo</td><td>foo</td></tr>
<tr><td>foo</td><td>foo</td><td>foo</td></tr>
</table>
</body>
</html>
Thanks, but I already figured it out. I didn't use the <td> element in my code, and then I realized that I should've, since it didn't take the place of the table element.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change border color for every cell of a table jdang67 CSS Cascading Style Sheets 10 May 6th, 2010 12:21 AM
Extending vertical border to another border olivaw CSS Cascading Style Sheets 5 March 16th, 2010 05:57 AM
CSS for Table border. rupen CSS Cascading Style Sheets 2 March 29th, 2006 09:41 AM
Table and border mani_he Javascript 6 January 4th, 2005 05:27 PM
static HTML table border problem Robin1 HTML Code Clinic 4 August 12th, 2004 04:58 AM



All times are GMT -4. The time now is 05:32 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.