CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 9th, 2003, 06:21 AM
DEfusion DEfusion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 288 DEfusion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 26 m 45 sec
Reputation Power: 6
Simple CSS selectors question.

Ok I have these CSS classes which I only want to be applied if the occur within an element already assigned a class i.e.

<div class="toplevel">
<div class="intop1">Stuff</div>
<div class="intop2">Stuff</div>
</div>

Now how I expected it to be formated in my CSS is probably not right, here's how I put it at the moment:

.toplevel { }

.toplevel.intop1 {}

.toplevel.intop2 {}

But I discovered if I have something else with one of the intop classes which is not within an element with toplevel class it still takes the intop settings.

Any help would be greatly appreciated.

-D

Reply With Quote
  #2  
Old July 9th, 2003, 06:45 AM
delta delta is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 65 delta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 39 sec
Reputation Power: 7
hi

try this:

.toplevel {}
.toplevel .intop1 {}
.toplevel .intop2 {}

you didn't put a space between the selectors
__________________
/delta

Reply With Quote
  #3  
Old July 9th, 2003, 06:52 AM
DEfusion DEfusion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 288 DEfusion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 26 m 45 sec
Reputation Power: 6
That seems to make no difference to me here.

-D

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Simple CSS selectors question.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT