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

Extending a style class

Is it possible to extend a style class?
for example i have to classes
.common {
color:red;
}
.commonFont {
font-family:Arial;
font-size:8pt;
}
I need the class commonFont also to have the properties of the class common.
How can this be done?
Oct 16 '07 #1
1 2472
drhowarddrfine
7,435 Expert 4TB
Yes and no. It's possible for an element to inherit styles from parent elements. For example, if you have a <h1 class="mystyles"> and <h2> inside a <div>, you can apply all the styles of <div> to the <h1> with:
div h1{
your styles
}
or better yet:
div .mystyles{

Another way is with "selectors".
Oct 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Michele Simionato | last post by:
Is there a way of "ending" a module? I would like something like this: # mod.py print 'something here' end() # some mysterious function print 'you should not get here' # main.py import mod...
4
by: henrikpierrou | last post by:
Hi, I am trying to extend an overridden base class method (printer) by printing some extra fields and then calling the base class method. Extract from the python tutorial: 'An overriding...
4
by: Matt | last post by:
Hi, I've been thinking about how to do this, but can't think of a solution. I have a class that is derived from System.Web.UI.WebControls.DataGrid which works a treat, but I'd like to extend...
6
by: Don | last post by:
Is it possible to somehow extend the string class (i.e. add new members to it)?
5
by: vbgunz | last post by:
Hello everyone. I own two books. Learning Python and Python in a nutshell. When cross referencing the two books to try and clarify the ideas behind extending methods and delegates, this is where...
3
by: cbradio | last post by:
Hi, I am having trouble developing a form in a restricted environment. My sample code is found below my message (sorry I don't have a URL). Basically, without a doctype, the form displays properly...
13
by: interec | last post by:
I have some code in Java that I need to translate into C++. My Java code defines a class hierarchy as follows: // interface IA public interface IA { public abstract void doA(); } //...
1
by: bluehtrombone | last post by:
Hi everybody, I am trying to extend the JavaScript's native class Element as below. If I then create two or more distinct objects, assigning values to any of them affects all the objets as if they...
0
by: =?Utf-8?B?Um9iZXJ0IFNtaXRo?= | last post by:
Hello I have some code to extend the gridview control as shown that hides the Select button and underlines the text as you scroll on it. I have also overridden the SelectIndexChanged event so...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.