473,804 Members | 3,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can u do this? (sub-classes)

I've been wondering for a while whether you can do this...

let's say I define a class thus:

..myClass {font-family:verdana, sans-serif; font-size:11px; color:#006699;
text-decoration:unde rline}

then I want to define a SUB-CLASS of this one.. i.e., I want to define a
new class just like this one but w/only one attr set differently, and I
don't want to repeat all attr's.. so how do I say

..subclass-of-above-class {color:#990000}

so this new sub-class of myClass has all attr's of above class except
for diff. font color..

can u do this? thank you...... Frances
Jul 21 '05 #1
10 6586
Els
Frances Del Rio wrote:
I've been wondering for a while whether you can do this...

let's say I define a class thus:

.myClass {font-family:verdana, sans-serif; font-size:11px; color:#006699;
text-decoration:unde rline}

then I want to define a SUB-CLASS of this one.. i.e., I want to define a
new class just like this one but w/only one attr set differently, and I
don't want to repeat all attr's.. so how do I say

.subclass-of-above-class {color:#990000}

so this new sub-class of myClass has all attr's of above class except
for diff. font color..

can u do this? thank you...... Frances


..myClass, .subclass-of-above-class{
font-family:verdana, sans-serif;
font-size:11px;color :#006699;
text-decoration:unde rline;
}
..subclass-of-above-class{
color:#990000;
}

<p class="myClass" >blue underlined 11px Verdana font </p>
<p class="subclass-of-above-class">red underlined 11px Verdana
font</p>

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Mötley Crüe - Dr. Feelgood
Jul 21 '05 #2
Frances Del Rio wrote:
I want to define a SUB-CLASS


http://dorward.me.uk/www/css/inheritance/

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #3
Frances Del Rio:
I've been wondering for a while whether you can do this...


You should have used that time to do a little research. There is a
similar thread <news:qg******* *************** **********@4ax. com> that
started less than two full days before yours (and many more before).
Jul 21 '05 #4
Christoph Päper wrote:
Frances Del Rio:
I've been wondering for a while whether you can do this...

You should have used that time to do a little research. There is a
similar thread <news:qg******* *************** **********@4ax. com> that
started less than two full days before yours (and many more before).


can't get to this "news:...." url, takes me to blank window in news
reader.. but thank you for yr response.. Frances
Jul 21 '05 #5
On 10/06/2005 01:57, Frances Del Rio wrote:
Christoph Päper wrote:
[...] <news:qg******* *************** **********@4ax. com> [...]


can't get to this "news:...." url, takes me to blank window in news
reader.. [...]


It is a message ID. Either use it to search through the messages stored
in your news reader, or strip off '<news:' and '>', and enter it into
the Google Groups search box.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 21 '05 #6

Christoph Päper wrote:
Frances Del Rio:
I've been wondering for a while whether you can do this...

You should have used that time to do a little research.


I know.. just now I needed it all of a sudden for my job.. thank you
very much to all for your responses.. Frances
There is a similar thread <news:qg******* *************** **********@4ax. com> that
started less than two full days before yours (and many more before).

Jul 21 '05 #7
On Thu, 09 Jun 2005 22:43:15 +0100, David Dorward
<do*****@yahoo. com> wrote:
Frances Del Rio wrote:
I want to define a SUB-CLASS


http://dorward.me.uk/www/css/inheritance/


This page recommends assigning two classes to an element, but I
thought not all major browsers support that?
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Jul 21 '05 #8
Stan Brown wrote:
http://dorward.me.uk/www/css/inheritance/
This page recommends assigning two classes to an element, but I
thought not all major browsers support that?


Internet Explorer is buggy when including two class selectors in a style
(i.e. div.classA.clas sB), but other then that I'm not aware of any support
problems.

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #9
Stan Brown:
This page recommends assigning two classes to an element, but I
thought not all major browsers support that?


Indeed, Netscape Navigator 4 does not. (IIRC it handles the first class
name of an attribute value just fine, though.) Anyhow, that is not a
major browser, but a lieutenant commander one (Navy, y'know). So don't
worry about it.
Jul 21 '05 #10

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

Similar topics

2
7609
by: Jason G | last post by:
** Any assistance you can provide would be greatly appreciated ** I have a main form with multiple sub-forms. On the main form, I have a checkbox that corresponds with each sub-form, and this checkbox will express the users desire to lock the ability to edit a corresponding sub-form. To do this, I figure that each checkbox will have : (1) the AfterUpdate property call a Macro or VB Module to execute the setting of the Allow Edits...
2
1045
by: Teep | last post by:
Where there is a duplicate invoice, I want to stop the process and post to the user on the same page and not continue to the next page...I tried Return or Exit Sub...but still the same thing occurs. Sub Close1Open2(Source as Object, E as EventArgs) pnl1.visible="false" pnl2.visible="false" pnl3.visible="false" pnl4.visible="true"
10
21332
by: tmaster | last post by:
When I try to dynamically add a second sub menu item to this ContextMenu item, I get an error 'Specified argument was out of the range of valid values'. Private Sub mnuTopics_Show_Select(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles mnuTopics_Show.Select Dim mShowMenuItem As MenuItem mShowMenuItem = DirectCast(sender, MenuItem)
3
1490
by: BoloBaby | last post by:
All, I believe I am having a threading problem. Class "BELights" is part of a larger DLL that is used by my main application. A user control (of type BESeat) within the main application raises an event and attempts to execute the "StartTiming" method of BELights. The method does not execute which leads me to believe that BELights is not thread-safe. (Or is it the user control that is not thread safe?) When an event fires for...
1
2095
by: Steve | last post by:
Hello, Is it possible to call a sub routine from 2 different threads at the same time? Or should I create a class containing this sub and instantiate the class for each thread? The sub pulls data from different data sources but the same structure. Right now I have 2 separate forms with the same sub. If I call both forms from the 2 threads I can pull the data faster than calling the sub for datasource1 and then calling the sub for...
4
1747
by: excelleinc.com | last post by:
Hello, I'm trying to put sub that's shared between all forms in my app in module so when I make change I just change it one time. This sub should execute and then invoke sub defaults() that's different for each form and is contained within the forms. You'll probably ask why don't I just put it in the form after the call to module.function, well it's a handler for one combobox so technically I don't call it.
7
2656
by: ILCSP | last post by:
Hi, I'm using VB.Net (2003) and I have a question. Does anyone knows how to call a procedure using a variable? The variable will be equal to the name of the procedure. for example, if I have the following variable: Public PrintTheSub as string and the following subs:
20
4817
by: vitorjol | last post by:
Hello. I have 2 forms (Form1 and Form2). When i call the Sub placed in form1 from form2, i get the error "object reference not set to an instance of an object" ! What can i do to solve the problem? Thanks
8
2812
by: Poudda | last post by:
Hey there, I'm new to VB and I'm having difficulty transferring a variable from one sub to the next. All I want to do here is ask for a variable (in this case, value is x) from a sub (subAsk), use it in my main sub (which manipulates it) and then reproduce the original value in a third sub (subAns). It only half works, and I've been all over the place looking for answers. Below is the code for what I'm trying to do (I'm in VBA for exel, but...
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10321
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9152
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5522
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.