Solved

Grouping childs of a contextual selector

Posted on 2008-10-24
4
235 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can I make a css class read only with jquery? 2 37
Error on Add method 1 38
P tag not forcing line space 2 23
Put shading on half of picture 8 26
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

895 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

12 Experts available now in Live!

Get 1:1 Help Now