Solved

Grouping childs of a contextual selector

Posted on 2008-10-24
4
233 Views
Last Modified: 2011-12-28
Hello,

I currently have something like:

.bigButton .buttonLeft { background-image:url(bigButton-left.gif); }
.bigButton .buttonCenter { background-image:url(bigButton-
center.gif); }
.bigButton .buttonRight { background-image:url(bigButton-right.gif); }
.bigButton ...

How can I group the .bigButton contextual selector?
something like this:

.bigButton [
  .buttonLeft { background-image:url(bigButton-left.gif); }
  .buttonCenter { background-image:url(bigButton-center.gif); }
  .buttonRight { background-image:url(bigButton-right.gif); }
  ...
]

Regards,
DAvid
0
Comment
Question by:dportabella
4 Comments
 
LVL 42

Assisted Solution

by:David S.
David S. earned 250 total points
ID: 22799243
There's no way to do that.
0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 250 total points
ID: 22800527
why not simply join all 3 gifs using photoshop into a single button image and use --

BUTTON.big { background-image:url(bigButton.gif); }

That would be the logical way to do this, I see no reason to keep a button split into 3 parts, since you want a single click on the whole, it is only making for redundancy and cross browser problems, is it not?
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37343923
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now