473,511 Members | 15,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

easy cascading question

hi all

I have a table which I assign a css class to like this...
<table class=tableclass>

and css that looks like this

..tableclass {background-color:red;}

I now want to style every TD within that table so I try

..tableclass td {background-color:blue;}

now this works fine in firefox, but IE gets quite upset.
what is the correct way to achieve this without finding every single TD
and assigning a class to it?

thanks

Jul 10 '06 #1
6 1041
Ci************@gmail.com wrote:
hi all

I have a table which I assign a css class to like this...
<table class=tableclass>
Should be <table class="tableclass"ideally.
You should also pick a more meaningful class name.
and css that looks like this

.tableclass {background-color:red;}

I now want to style every TD within that table so I try

.tableclass td {background-color:blue;}

now this works fine in firefox, but IE gets quite upset.
what is the correct way to achieve this without finding every single TD
and assigning a class to it?
This is syntactically correct, and fully supported by ie, afaik - does
it validate ? If so, post a url.
You should also set color everywhere you set background-color, for
reasons discussed already in this group, and explained by the validators.
http://validator.w3.org/
http://www.htmlhelp.org/tools/validator/
http://jigsaw.w3.org/css-validator/

Chris

Jul 10 '06 #2

Ci************@gmail.com wrote:
what is the correct way to achieve this without finding every single TD
and assigning a class to it?
You appear to have done it, so the problem is something else.

If you'd posted a URL, we'd have been able to tell you.

Jul 10 '06 #3
some interesting things...

sometimes I want to remove a css line just temporarily, so I ruin the
line by adding a character,

eg
border:
becomes
xborder:

and then I tidy up later on when I'm sure I don't want the line.

something that ruined my page was using an apostrophe as the junk
character...

eg
'border:

now FF understood what I was doing but IE didn't. I'm not sure if this
was the main cause of my problem, but I also rewrote the class thing so

class=myclass was replaced with id=myclass
and in the css file
..myclass
..myclass td

became
#myclass
#myclass td

and now I am as happy as a biddy!

(despite the huge frustrations of the differences between ff and ie.
bring back tables!!!)

Andy Dingley <di*****@codesmiths.comwrote:
Ci************@gmail.com wrote:
what is the correct way to achieve this without finding every single TD
and assigning a class to it?

You appear to have done it, so the problem is something else.

If you'd posted a URL, we'd have been able to tell you.
Jul 10 '06 #4
To further the education of mankind, Ci************@gmail.com
vouchsafed:
and now I am as happy as a biddy!
The biddies I know aren't particularly happy.
(despite the huge frustrations of the differences between ff and ie.
bring back tables!!!)
....and the horse! No more higher gas prices! Wonder what hay is going for
these days?

--
Neredbojias
Infinity has its limits.
Jul 11 '06 #5
oddly, I now use a combination of tables and css for layout.
and just out of curiosity I did a viewsource on this very page, and lo
and behold, so do google! I should charge more money :-)
Neredbojias wrote:
To further the education of mankind, Ci************@gmail.com
vouchsafed:
and now I am as happy as a biddy!

The biddies I know aren't particularly happy.
(despite the huge frustrations of the differences between ff and ie.
bring back tables!!!)

...and the horse! No more higher gas prices! Wonder what hay is going for
these days?

--
Neredbojias
Infinity has its limits.
Jul 11 '06 #6
To further the education of mankind, Ci************@gmail.com
vouchsafed:
oddly, I now use a combination of tables and css for layout.
and just out of curiosity I did a viewsource on this very page, and lo
and behold, so do google! I should charge more money :-)
Well, I'm not a table nihilist, but I think most of the time one can do
better with css and divs, etc. However, the other day it occurred to me
that up to 90% of my markup-time (css/html) is spent trying to accommodate
the _differences_ in browsers, not designing the page or even straight-
forwardly dealing with the "coding". That's pitiful.

--
Neredbojias
Infinity has its limits.
Jul 12 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1775
by: Humpty Dumpty | last post by:
Hi folks, here's a challenge: I have a dynamically created cascading menu in Tkinter that can be quite large because it is created from a file. I tried using lazy creation so only the menu item...
9
3412
by: (Pete Cresswell) | last post by:
Seems like when there's a 1:1 relationship, the order of referential integrity enforcement depends on which way you drag the mouse pointer when drawing the relationship line. If you drag from...
1
1370
by: arjun.zacharia | last post by:
Hi everyone, i want to implement a cascading menu in my application but do not want to reinvent the wheel. is there anybody here who might have written such stuff or could help me with somem...
3
3968
kcdoell
by: kcdoell | last post by:
I have 5 cascading combo boxes on a form. Below is a sample of my vb in the first combo box: Private Sub CboDivision_AfterUpdate() 'When the Division is selected, the appropriate Segment...
0
2394
by: petwir | last post by:
We've got a cascading delete being used in DB2. I've built new triggers under the parent/child tables in this cascading delete relationship. So when they delete the parent, and the cascade...
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5676
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.