Wrox Programmer Forums
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 22nd, 2006, 09:46 AM
Registered User
 
Join Date: Mar 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Applying CSS to tables

Hi, I have 2 different types of table in my HTML file that have different properties such as background colour, size etc.

Is there a way to get my CSS file to handle each table separately so that the necessary properties can be applied to each individual table.

Also, I am having trouble when trying to apply properties to my text. If I call the standard text by the tag <h6> then it appears with the correct margins inside the table. However, the font is incorrect for some reason. If i rename the tags to <text6> then I get the font I want but lose the ability to set the text a distance from the table edges.

Any help would be greatly appreciated.

 
Old March 22nd, 2006, 10:07 AM
Authorized User
 
Join Date: Mar 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, CSS can handle the tables seperately. To answer your problem, need a link, preferably, or the code.

 
Old March 22nd, 2006, 10:38 AM
Registered User
 
Join Date: Mar 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Think I have fixed the second problem.

The table thing still isnt working. I have two tables in my html file that at the moment have no ID. If I give them both separate ID's, such as 'info' and 'cost' (using <table id="info"> and <table id="cost">) then shouldn't I be able to make reference to them using #cost and #info in my CSS file? This doesnt seem to be working though.

 
Old March 22nd, 2006, 01:05 PM
Authorized User
 
Join Date: Mar 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yep, should work. Which browser are you viewing this in? Does it work in Firefox or Opera? External stylesheet or inline styling? What are you trying to style?

 
Old April 5th, 2006, 05:30 AM
Registered User
 
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If styling the table isn't working, you can certainly style <td>s and <tr>s--drawback is having to apply the style multiple times. Still, you could do something with multiple classes...







Similar Threads
Thread Thread Starter Forum Replies Last Post
What's better - Web Pages built with Tables or CSS Adam H-W CSS Cascading Style Sheets 1 July 7th, 2006 10:07 AM
Applying CSS to a disabled List Box in ASP.net imsuneeta ASP.NET 1.0 and 1.1 Basics 1 May 2nd, 2005 08:56 PM
Tables vs. layers (CSS question) jacob HTML Code Clinic 6 December 1st, 2003 06:21 AM
CSS Inheritance and tables pagates HTML Code Clinic 5 September 30th, 2003 01:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.