473,405 Members | 2,379 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,405 software developers and data experts.

why does inheritance not work with class selectors?

Hi,

Trying to figure this out for some time now, but I don't get it ... I
have something like this:
..myclass {
color: red;
}

<p class="myclass"> this is <b> some </b> text </p>

By my understanding of inheritance in CSS 'some' should be in red, but
it isn't (in IE6 at least). What am I doing wrong?

Thanks for any help, Gertjan
Jul 21 '05 #1
2 1489
Gertjan van Heijst wrote:
Hi,

Trying to figure this out for some time now, but I don't get it ... I
have something like this:
.myclass {
color: red;
}

<p class="myclass"> this is <b> some </b> text </p>

By my understanding of inheritance in CSS 'some' should be in red, but
it isn't (in IE6 at least). What am I doing wrong?


What is the URL?
Jul 21 '05 #2
Gertjan van Heijst wrote:
.myclass { color: red; }
<p class="myclass"> this is <b> some </b> text </p>

By my understanding of inheritance in CSS 'some' should be in red, but
it isn't (in IE6 at least). What am I doing wrong?


It should be - assuming that the value of the color property for that <b>
element is "inherit".

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #3

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

Similar topics

6
by: Brian Jones | last post by:
I'm sure the solution may be obvious, but this problem is driving me mad. The following is my code: class a(object): mastervar = def __init__(self): print 'called a'
1
by: Tony Benham | last post by:
I have been getting to grips with css recently (very slowly), and one area I have a problem is when to use class selectors or id selectors. Are there any guidelines when to use each type ? The key...
15
by: Bob | last post by:
I need to apply a border to a table's columns, but not to the columns of tables nested within (I realize nested tables are bad form, it's a client request). I can't control what goes inside this...
9
by: Axel Dahmen | last post by:
Hi, when I'm programming style sheets for a whole web application I'm missing a CSS feature to be able to reference CSS properties of other elements. Let's say there is a...
5
by: Lee | last post by:
I'm a newbie to CSS and I'm wondering if there is a way to implement inheritance in a way similar to C++/Java? ie: if I have a class: div.parent { padding: 0px; margin: 0px } and I want...
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...
6
by: tshad | last post by:
I am playing with Inheritance and want to make sure I understand it. I have the following Classes: ******************************************* Public Class AuthHeader:Inherits SoapHeader Public...
4
by: Jim | last post by:
More of a request for opinions than a direct question, but here goes..... When I'm creating a style sheet for any site, the first thing I do is to analyse the design visuals and work out my...
32
by: Stephen Horne | last post by:
I've been using Visual C++ 2003 for some time, and recently started working on making my code compile in GCC and MinGW. I hit on lots of unexpected problems which boil down to the same template...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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
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...

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.