WOW! That's so close to what I was going to do it is scary!
I wasn't going to bother with the :checked part on the style, since he needs the onclick anyway (I was just going to change the style via the onclick).
But I *do* like the fact than now the onclick handler can be completely independent.
NOW....
What I still don't get is this part
Quote:
If they've not checked that they have completed 2011 for example or not checked everything in-side to auto-check the 2011 objectives, the 2012 objectives will not show on the map as they don't be available.
How will changing the class *OF THE CHECKBOX* help with all of that???
Seems to me you want to change the class of something that *depends* on the checkbox! That is, as you say, if the 2011 objectives are not met then the class for the 2012 objectives would presumably contain display: none; or equivalent.
It also seems to me that you want to change the class (or maybe simply the color) of the *labels*, not necessarily of the checkboxes, per se.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
He/you will have to use image-software to reduce the size of the images (if required) or, presumably just find smaller images.
Probably need to use absolute-positioning, negative margins (etc.), to bring the little i-image between the label and the checkbox. It could be a background to the label but this would make it trickier to click
Actually, we could probably just position the i-image between the label and checkbox(?).
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
Fascinating. Changed both of them, by the way, and it worked fine. (Also worked when only the span.red was change.)
Why did the + work, at all???
EDIT: Oh, stupid me. + means "immediately following" where ~ means "any following". DOH. Nice.
Now to figure out how to change the color of text that *precedes* the checkbox. I don't think there is a CSS selector that will do that, but we could do it a different way, I think...hmmm...
By the by, so far as I can tell, the z-indexes you used don't do anything. I changed your z-index of 8 to 25 and it made no difference.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Last edited by Old Pedant; 01-05-2013 at 01:12 AM..
I extracted this code from another page so presumably z-index has lost its impetus..
+ Is the adjacent sibling selector, ~ is the general sibling selector. But, of course, you've inserted another element.. between
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
check #Objectives {
if (Category1 == checked) {
class == done;
}
}
check #objectives2012 {
if (Sub-Category1 == checked && Sub-Category2 == checked && Sub-Category3 == checked) {
Category1 class = done
}
else if (Sub-Category1 == checked || Sub-Category2 == checked || Sub-Category3 == checked) {
Category1 class = started
}
else {
Category1 class = not_done
}
}
Hopefully you can see what I'm trying to show there and hopefully there's a way to check if everything under a tab of lets say #mission_3 checks are all checked otherwise I'll need a big if statement to check if all of them are done checked of any of them...
I'll read back on this tomorrow as I am very tired now and need to sleep.
Oh and Andrew, will your code work with my image at all? It's not essential, I'm just curious.
Thank you both for all your help!
Last edited by MrTIMarshall; 01-05-2013 at 01:21 AM..
@MrTIMarshal Yes, of course, you could substitute your images - although they're not as nice as mine . Depending on the size of the images you'll probably need to adjust the css as well - so that the span sits neatly with the checkbox.
For browsers < IE9 we would have to reinstate the opacity of the checkbox and remove the background images from the span.. or try and push it behind the checkbox (bleugh!!).
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
Last edited by AndrewGSW; 01-05-2013 at 01:25 AM..
Regardless of what the outcome is tonight, I'll start making the 2012 sub-Categories and their todo's so there is at least one full thing to test on and for me to study and do for the other years.
The display: inline; is very important for the <label>! Else you can't put more than one on a line, of course.
Yes, my original page had the "Remember me" option on its own line.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS