473,408 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Inheritance and individual fomats

Hi,

I tried to apply a format to all td's in one specific table but not to
the td's in other tables.
I tried the following:

<table id="thistable">
<thead>
[...]
</thead>
<tbody>
<td></td>
</tbody>
</table>

withe the style:
#thistable td { [...] }

But the style applies to all td's in the document, even in other tables.

What do i do wrong?

Chris

PS: I don't use tables for layout, just to leave no doubt...
Jul 20 '05 #1
5 1299
Chris Leipold wrote:
I tried to apply a format to all td's in one specific table but not to
the td's in other tables.
I tried the following:

<table id="thistable">
<thead>
[...]
</thead>
<tbody>
<td></td>
</tbody>
</table>

withe the style:
#thistable td { [...] }

But the style applies to all td's in the document, even in other tables.

What do i do wrong?


<td> should be enclosed in <tr>, I think.

The principle works fine here: see
http://tranchant.plus.com/tmp/td

--
Mark.
http://tranchant.plus.com/
Jul 20 '05 #2
Chris Leipold <cl******@dietzk.de> wrote:
Hi,

I tried to apply a format to all td's in one specific table but not to
the td's in other tables.
I tried the following:

<table id="thistable">
<thead>
[...]
</thead>
<tbody>
<td></td>
</tbody>
</table>

withe the style:
#thistable td { [...] }

But the style applies to all td's in the document, even in other tables.

What do i do wrong?


Well, for one thing, you've got invalid HTML, since TD doesn't go
directly inside TBODY. TD can only go inside TR, and only TR can go
inside TBODY. Fix and validate your page, and then see what happens.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #3
Hi,
I tried to apply a format to all td's in one specific table but not to
the td's in other tables.
I tried the following:

<table id="thistable">
<thead>
[...]
</thead>
<tbody>
<td></td>
</tbody>
</table>

withe the style:
#thistable td { [...] }

But the style applies to all td's in the document, even in other tables.
What do i do wrong?
<td> should be enclosed in <tr>, I think.

Sorry, sorry, sorry!!! My code is valid, I just copied and pasted not
the whole code an forgot to copy the <tr>. (I used the w3-validator
before mailing to the group).

Chris
Jul 20 '05 #4
Chris Leipold <cl******@dietzk.de> wrote:
Hi,
I tried to apply a format to all td's in one specific table but not to
the td's in other tables.
I tried the following:

<table id="thistable">
<thead>
[...]
</thead>
<tbody>
<td></td>
</tbody>
</table>

withe the style:
#thistable td { [...] }

But the style applies to all td's in the document, even in other tables.
What do i do wrong?

<td> should be enclosed in <tr>, I think.

Sorry, sorry, sorry!!! My code is valid, I just copied and pasted not
the whole code an forgot to copy the <tr>. (I used the w3-validator
before mailing to the group).


Then something else is wrong, but if we can't see all your code, the
chances are that all we have to look at is where the problem isn't.

Also--what browser are you using?

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #5
On Fri, 10 Sep 2004 10:34:57 +0200, Chris Leipold <cl******@dietzk.de>
wrote:
Sorry, sorry, sorry!!! My code is valid, I just copied and pasted not
the whole code an forgot to copy the <tr>. (I used the w3-validator
before mailing to the group).


This is why a URL is recommended.
Jul 20 '05 #6

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

Similar topics

5
by: Jeff Greenberg | last post by:
Not an experienced c++ programmer here and I've gotten myself a bit stuck. I'm trying to implement a class lib and I've run into a sticky problem that I can't solve. I'd appreciate any help that I...
5
by: Tony Johansson | last post by:
Hello! If you have the following inheritance A is the base class for the derived class B and B is the base class for the derived class C. In this case will the constructor of class C be executed...
20
by: Steve Jorgensen | last post by:
A while back, I started boning up on Software Engineering best practices and learning about Agile programming. In the process, I've become much more committed to removing duplication in code at a...
14
by: Steve Jorgensen | last post by:
Recently, I tried and did a poor job explaining an idea I've had for handling a particular case of implementation inheritance that would be easy and obvious in a fully OOP language, but is not at...
14
by: JPRoot | last post by:
Hi I use the following syntax to have events inherited from base to child classes which works nicely (virtual and override keyword on events). But I am wondering if it is a "supported" way of using...
3
by: Darren | last post by:
I have a Person object and from that I'm inheriting other objects including Client, Carer, Doctor (and others). The Person object has a large number of properties and methods that I want available...
1
by: Lee | last post by:
I need to implement a custom ToString method for derived classes. The method should return a string that is the result of concatenating the results of a ToString on each of the fields in the...
1
by: felix-lists-pgsql | last post by:
I converted some tables from individual definitions to use object inheritance and now get failures of a foreign key constraint. Here is the file which creates schema tst and the tables: ...
60
by: Shawnk | last post by:
Some Sr. colleges and I have had an on going discussion relative to when and if C# will ever support 'true' multiple inheritance. Relevant to this, I wanted to query the C# community (the...
8
by: RSH | last post by:
Being rather new to OOP constructs I have a question regarding inheritance. What is the proper way to setup my classes in a Company/Employee relationship. I have a Company Object and a company...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...

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.