473,465 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

about css class selector

Hi,

Can I define a css class selector depending on another class selector?
Thanks a lot!

Jack


Jul 23 '05 #1
2 1560
"datactrl" <qu***@tpg.com.au> wrote in message
news:41********@dnews.tpgi.com.au...
Hi,

Can I define a css class selector depending on another class selector?


Do you mean like this?

class1{some style stuff here}
class2 = class1 + {some more style stuff here}

I found two ways:

1)
class1, class2{common style stuff here}
class2{class2 specific style stuff here}

2}
class1{style stuff here}
class2{more style stuff here}
....and combine them like this...
<div class="class1 class2">Summat here</div>
Jul 23 '05 #2
Thanks a lot, Danny. It's exactly what I want.

Jack
Do you mean like this?

class1{some style stuff here}
class2 = class1 + {some more style stuff here}

I found two ways:

1)
class1, class2{common style stuff here}
class2{class2 specific style stuff here}

2}
class1{style stuff here}
class2{more style stuff here}
...and combine them like this...
<div class="class1 class2">Summat here</div>

Jul 23 '05 #3

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

Similar topics

5
by: Bill M. | last post by:
Hello, I would like to extend or sub-class the base HTMLSelectElement and add some custom properties and methods. So far this works to create a new select element. var new_select= new...
3
by: riki | last post by:
hi, i'm doing some tutorial with CSS and have a little problem...i've posted the source as well so you could see what i'm talking about...when i roll with mouse over link >>The Bio<< text get's...
7
by: Philip Herlihy | last post by:
If I'm reading my reference books correctly, I should be able to pick out cells in a table by combining a <col> selector with a class selector, like this: col#thisid td.thisclass {color: red; }...
1
by: Timo Nentwig | last post by:
Hi! I want to directly manipulate a CSS class: #bla { property: 123; } <span id="bla">foo</span>
13
by: Patient Guy | last post by:
While the values of 'id' and 'name' attributes include restrictions on the use of characters such as beginning with a letter, the values of the 'class' attribute define no restriction as I can...
8
by: pamelafluente | last post by:
Hi guys, Is it possible to add "onload" (via Javascript) a new class to the <styleheader section? If yes, how would that be done ? <style type="text/css" media="screen"> .NewStyleClass{...
25
by: toffee | last post by:
Hi all, apologies if this seems like a pretty basic question - but can an element have more than one class? if so, how do you set them ? and how does the browser give priority to a class over...
12
by: WaterWalk | last post by:
Hello. I am rather confused by the type of a pointer to class data member. Many c++ texts say that pointer to data member has a special syntax. For example the following class: class MyClass {...
3
by: shapper | last post by:
Hello, I have 3 type of h2 headers on my web site: 1 - Post titles on a blog (Ex: <h2>New documents available for download</h2>) 2 - Content section title (Ex: <h2>Contacts</h2>) 3 -...
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
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
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: 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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.