Solved

Grouping childs of a contextual selector

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jQuery Animation faster 5 48
jQuery scrollTop 2 48
CSS Question 5 81
To remove highlight from a "a href" 5 30
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
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 transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
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…

785 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