Categories
uncategorized

CSS tricks: Styling parent elements with :hover

Originally published at jeremyjarratt.com. You can comment here or there.

[EDIT: this site no longer supports the features described in this article. Sorry.]

You may have noticed in my sidebar that there are a few elements which are nested in an obvious hierarchical order. For example, at the time of this writing, i have a list of books which i am either reading, planning to read, or have already read, listed under the “now reading” heading.

You may also have noticed that the heading for each of these menu items is highlighted whenever you hover your cursor (pointer) over it.

What you may not have noticed is that the headings for these items’ parent elements is also highlighted when its descendant is hovered over. In other words, when you hover over the “planned books,” “current books,” or “recent books” list, the parent element, “now reading,” is highlighted as well.

(If you’re still not sure just what the hell i’m talking about, check out the demo first, and then come back.)

This is a cool trick that you rarely ever see on the internets, and it’s remarkably simple to do. You don’t need no fancy JavaScripting to do it, either! No server- or client-side scripts are used at all, just good old CSS, and a properly nested hierarchy of elements.

First, create a nested list, with headings. For example:

<ol>
<li>
<h1>text</h1>
<h2>more text</h2>
<ol>
<li>
<h3>subtext1</h3>
</li>
<li>
<h3>subtext2</h3>
<ol>
<li>
<h4>subtext2.1</h4>
</li>
<li>
<h4>subtext2.2</h4>
</li>
</ol>
</li>
<li>
<h3>subtext</h3>
</li>
</ol>
</li>
<li>
<h2>text again</h2>
</li>
</ol>

Now create the following style rules:

li:hover>h2, /* matches the H2 element when its parent list-item is hovered over */ li:hover>h3, li:hover>h4, li:hover>h5
{
background: #000;
color: #fed;
}

(Note that the H1 element is not styled and thus does not actually participate in any fancy hover effects.)

Now save your page and test it out. You can adapt this technique to work with just about any set of nested elements. (Just make sure your nest validates!)

See the demo

Categories
uncategorized

Happy birthday to Holly!

Originally published at jeremyjarratt.com. You can comment here or there.

Dear Holly,

You are ah-THE bomb.

Happy birthday, dear sweet Miss Thang. Hope you enjoyed your Freedom Toast.

Love & kisses,

~jer

Categories
uncategorized

Sarah Palin: unevolved

Originally published at jeremyjarratt.com. You can comment here or there.

So… if Sarah Palin doesn’t believe in evolution… can we call her unevolved?? And nobody even gets upset??? Really?!

So... if Sarah Palin doesn't *BELIEVE* in evolution... can we call her NON-EVOLVED?? And nobody even gets upset??? Really?!

Sarah Palin

Categories
uncategorized

The Daily Show on Republican hypocrisy

Originally published at jeremyjarratt.com. You can comment here or there.

Categories
uncategorized

Google Chrome obeys alternate CSS

Originally published at jeremyjarratt.com. You can comment here or there.

So Google Chrome is out. That’s great! It’s really a cool, fast, secure browser.

Unfortunately, it appears to break sites in one very important way: it obeys alternate stylesheets, just as if they were normal, active stylesheets. This breaks sites who print their alternate CSS links after active ones (like mine – for now).

I’ve sent this in as a bug to Google, and i’d recommend that others do the same (select “report bug or broken website” from the page icon to the upper right).

At the moment, the only thing to do is to list alternate stylesheets before active ones, or exclude alternate links altogether.

However, there are (naturally!) problems with each method…

Listing alternate CSS (which would still be obeyed) could still cause style conflicts, if there are any rules which are not contradicted (read: overwritten) by later stylesheets below the alternate ones.

On the other hand, not listing alternate stylesheets disables additional functionality in user agents such as Opera, which allows users to select from a menu what style they’d prefer to view a site in – which is arguably the best, most accessible method of switching stylesheets (if you’re using one of those user agents, that is).

For my money, i believe the former is the best option. This means i may have to do some code “cleaning,” which i should have done anyway. In fact, rather than removing extraneous CSS rules, i’ll be adding rules which do not exist in, say, X.css to Y.css, in order to counteract any style collisions by overwriting them with alternate rules.

Btw, for those who need it, here’s the User Agent string i captured:

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13

[UPDATE] Matt Wilcox helpfully pointed out that this isn’t exactly a Chrome bug, but a leftover Safari one which has apparently been around for years, according to a decently shrewd Google search. Lesson: test in Safari, even if you think it’s a Practically Perfect Browser.

I have fixed it locally but am waiting for at least a few more hours in order to use this site as an example. Hey, it beats making a quick mock-up. Sort of. (My teachers always thought i was most useful as an example to warn others – well, i do what i can!)

And a big thanks to the great Jeffrey Zeldman for helping get the word out to designers about this. Of course, 99% of people making web sites won’t be affected, but for those of us using alternate styling, it’s a nasty thing to have happen.

[UPDATE 2] To clarify, Safari and Chrome both use the Webkit rendering engine, as well as parts of the Mozilla FIrefox codebase. Not to point fingers or anything. I’m just sayin’ is all.

[UPDATE 3] I couldn’t take it anymore. I fixed things here so there shouldn’t be any issues. I use a browser sniffer to detect the user agent and deliver either modern CSS or a crappy facsimile thereof for older, less standards-compliant user agents. As long as i keep up to date, no problem… of course, the drawback is obvious. I must keep up to date. Anyway, i’ve completely eliminated the alternate styles for both Chrome & Safari, at least until this bug is fixed in the Webkit renderer. In the meantime, i’ll put together a tester page and link it here.

Categories
life local uncategorized

Smith’s Automotive

Smith’s Automotive at 400 E. 3rd St. in Dayton, Ohio (next to Wympee’s) is awesome. Daniel the proprietor is such a really nice guy. He even offered me water and gave me a camping chair to sit on while i was outside smoking. Lightning fast. He drove the car with me before and after the repair, and charged me very little. I just can’t say enough about this guy.

If your car needs help, you seriously can not do any better than to have him on your side.

Categories
uncategorized

amateur vs. professional

The difference between an amateur and a professional is that the amateur knows exactly what they are doing, while the professional is just making stuff up as they go along.

Think on this.

Peace out.

Categories
life uncategorized

When i am dead

When i am dead, i wish to be burned to a crisp, and have my dirty ashes scattered by close friends wherever they please.

It is my wish that whatever organs are desperately, vitally needed by someone else in their direst hour be given to them, free of charge, with the condition that such license to use and/or modify shall be taken up by them also, and that no derivative works shall result in profit. After all, i am an open source, Creative Commons person.

My stuff shall be dispersed however my few close friends see fit, with the understanding that of course my dear love Holly should have pretty well everything to start with, shared mainly with anything my dad & uncle  might want (so you better ask them all real nice if you want my Cure CDs). However, Tony D. is not to have anything until he sobers the hell up. There’s no point in giving anything to a man who’s only going to exchange it for crappy booze or some other escapist bullshit. On the other hand, his wonderful daughter Abby is welcome to just about anything she chooses.

I want my unfinished work to be wrapped up somehow. I don’t care how, so long as i become extremely famous and fabulously wealthy after death. Just don’t screw it up like you do everything else. This is Important Shit.

A grave marker will be permitted if anyone wants to bury my ashes, as long as the epitaph is funny as hell. My suggestions:

  • “I probably shouldn’t have done that.”
  • “Whew! Good thing that’s over.”
  • “Oops!”
  • “Not here, and not there either.”
  • “Thankfully gone, decidedly forgotten.”

If you have something better, go for it.

No serious religion shall stake a claim on any part of my death, including but not limited to any services performed to mark my exit. No rites or stupid ceremonies are to be performed, with the lone exception being that my homies will be permitted to spill some on the curb for me. No spiritual messages are to be given, and no priest of any faith shall officiate. It is to be wholly remembered that i was a devout agnostic, who leaned heavily toward atheism. Anyone caught claiming that i somehow had a soul that lived on after death shall be haunted by my fictitious ghost forever, or until they come to the conclusion that i am not haunting them at all, whichever comes first. I lived through enough horse shit; i don’t need to deal with more of it once i am dead and gone forever. My passing should be viewed as permanent. There is to be no prayer of any kind, except in jest. Silent meditation is permitted, but please: no god shit, and no afterlife crap.

Two religions which are permitted practices and/or short rites are the Church of the SubGenius and the P.O.E.E. (disciples of Eris, goddess of confusion – i think), and they should mock the whole goddamn thing, if they even bother to show up. I also do not mind Buddhism all that much.

No flowers, please. Take your money and donate it to a non-religious charity that does work with AIDS patients or research, breast cancer (again, patients or research), homelessness, runaways, asthma, the environment, civil and/or human rights, putting an end to consumerism, humanitarian efforts, nuclear disarmament, or anything related to promoting atheism or agnosticism or the like.

On the other hand, any services performed to mark my escape from this terrible veil of lies should have a darkly humorous bent, and anyone eulogizing me must include at least one tasteless joke at my expense, or (more preferably) the expense of others. Weirdness should be encouraged at any cost. Attempts should be made at gallows humor. Thou shalt have joy, and laughter, damn it. Death is nothing serious. Be wholly glad i am gone!

Categories
uncategorized

When i am dead

Originally published at jeremyjarratt.com. You can comment here or there.

When i am dead, i wish to be burned to a crisp, and have my dirty ashes scattered by close friends wherever they please.

It is my wish that whatever organs are desperately, vitally needed by someone else in their direst hour be given to them, free of charge, with the condition that such license to use and/or modify shall be taken up by them also, and that no derivative works shall result in profit. After all, i am an open source, Creative Commons person.

My stuff shall be dispersed however my few close friends see fit, with the understanding that of course my dear love Holly should have pretty well everything to start with, shared mainly with anything my dad & uncle might want (so you better ask them all real nice if you want my Cure CDs). However, Tony D. is not to have anything until he sobers the hell up. There’s no point in giving anything to a man who’s only going to exchange it for crappy booze or some other escapist bullshit. On the other hand, his wonderful daughter Abby is welcome to just about anything she chooses.

I want my unfinished work to be wrapped up somehow. I don’t care how, so long as i become extremely famous and fabulously wealthy after death. Just don’t screw it up like you do everything else. This is Important Shit.

A grave marker will be permitted if anyone wants to bury my ashes, as long as the epitaph is funny as hell. My suggestions:

  • “I probably shouldn’t have done that.”
  • “Whew! Good thing that’s over.”
  • “Oops!”
  • “Not here, and not there either.”
  • “Thankfully gone, decidedly forgotten.”

If you have something better, go for it.

No serious religion shall stake a claim on any part of my death, including but not limited to any services performed to mark my exit. No rites or stupid ceremonies are to be performed, with the lone exception being that my homies will be permitted to spill some on the curb for me. No spiritual messages are to be given, and no priest of any faith shall officiate. It is to be wholly remembered that i was a devout agnostic, who leaned heavily toward atheism. Anyone caught claiming that i somehow had a soul that lived on after death shall be haunted by my fictitious ghost forever, or until they come to the conclusion that i am not haunting them at all, whichever comes first. I lived through enough horse shit; i don’t need to deal with more of it once i am dead and gone forever. My passing should be viewed as permanent. There is to be no prayer of any kind, except in jest. Silent meditation is permitted, but please: no god shit, and no afterlife crap.

Two religions which are permitted practices and/or short rites are the Church of the SubGenius and the P.O.E.E. (disciples of Eris, goddess of confusion – i think), and they should mock the whole goddamn thing, if they even bother to show up. I also do not mind Buddhism all that much.

No flowers, please. Take your money and donate it to a non-religious charity that does work with AIDS patients or research, breast cancer (again, patients or research), homelessness, runaways, asthma, the environment, civil and/or human rights, putting an end to consumerism, humanitarian efforts, nuclear disarmament, or anything related to promoting atheism or agnosticism or the like.

On the other hand, any services performed to mark my escape from this terrible veil of lies should have a darkly humorous bent, and anyone eulogizing me must include at least one tasteless joke at my expense, or (more preferably) the expense of others. Weirdness should be encouraged at any cost. Attempts should be made at gallows humor. Thou shalt have joy, and laughter, damn it. Death is nothing serious. Be wholly glad i am gone!

Categories
creative internets uncategorized web design

back to the drawing board!

I’m working on a project for a friend right now involving WordPress, which has got me excited enough to go ahead and overhaul this site once again.

So i will FINALLY be upgrading my WP installation and fixing my ACTUAL theme once and for all! I hope to have this completed by the end of the summer.

I promise to make it a whole lot cleaner, too, in layout if not in language.

That is all.

Categories
media uncategorized

Westboro Baptist movies

OMFG why didn’t anyone tell me about this!? Westboro Baptist Church apparently has its very own movies site! It’s hilarious and sad at the exact same time. The music videos are priceless! Why on earth do people like Rev. Dr. King and the Kennedys get shot while Fred Phelps is still walking???

Categories
life uncategorized

God’s big flaw

To my mind, there is nothing better than the idea that THIS is all there is, that there is no afterlife and no ultra-benevolent (yet strangely, fiercely jealous) Super-Grampa waiting to scoop us up in His arms when we die; that WE are responsible for what we do with our lives and how we shape our future as a species and individually. The idea that this is our one chance to get things right just makes life that much more important and special and precious. To me, life is sacred and holy enough without superstition or outdated ideas regarding how things work.

I also don’t see any problems with the idea that we are a wonderful accident of nature (which includes, but is not limited to, life). There is tremendous beauty in chaos.

And here’s a philosophical question hardly anyone ever bothers to ask:

We think of time as a line on a graph representing the space-time continuum. We know that we can move in any direction in space. There is, theoretically, nothing really stopping us from moving in any direction in time, either, if time is a fourth dimension (as has been repeatedly suggested by theoretical physicists and philosophers alike). So… we if move “backward,” aren’t we then uncreated? Does the flow of time alter god? Does god become cruel and sadistic depending on which direction s/he/it is facing? And does that, by definition, blast into smithereens a whole lot of god’s “omnipotence”?

p.s., i used to be a hands-waving-in-the-air-for-some-reason zealous Christian as a teenager. I even destroyed my Duran Duran records over it, strangely assuming that Jesus was so egotistical that he only ever wanted to have songs all about himself. Thank [     ] i’m reformed now.

Categories
current events memories uncategorized

R.I.P. George Carlin

Comedian George Carlin dies in Los Angeles at 71

Categories
internets life uncategorized

Askmen.com’s Top 10: Worst Male-Bashing Ads

These worst male-bashing ads will get you riled up…

Not me, man. Men really ARE idiots. And some of these ads are funny as hell.

Ok, i pretty much only associate myself with people who meet my admittedly high standards. So, present company definitely excluded, dudes. But other than my close friends (ok, even some of my close friends) and my online guy pals, most of the males i have known have been boorish dicks, mindless oafs, and knuckle-dragging morons. I’m talking about the “beer+fuhbaw+chicka-wings” crowd of Maxim-reading gargantuan-pickup-driving dolts. You know them. I know them. They’re imbeciles, and they’re inevitably the ones who spring to mind when Europeans think of Americans. I’ll say it right now, out loud, in a very public place: i hate those retarded jackasses. They can all go straight to shit.

Categories
internets uncategorized

“Fanatical Ignorance”

Exploring The Creation Museum – America’s New Mecca of Fanatical Ignorance
Excellent article on religious super-fundamentalism!

Categories
current events internets media uncategorized

Compelling anti-war video

Former U.S. soldier droppin’ some Truth about this bullshit war in Iraq. Do your self and your conscience and your country and your fellow human beings a favor by watching this and then doing something about it.

Categories
current events life local memories uncategorized

Quake!!!

I totally just felt an earthquake! In Dayton, Ohio! I have not experienced that since way back in the 80s!

The house vaguely shook, and i heard a slight rumble, followed by the house creaking and popping, woodly. My first thought was that we were being invaded by something [non-supernatural].

Wacky!

Categories
current events internets media movies uncategorized

Ben Stein: apparently, biggest idiot ever

Ben Stein, who we no doubt all know and love from his appearances on Ferris Bueller’s Day Off and Win Ben Stein’s Money, has made a little movie. It’s called Expelled: No Intelligence Allowed (my thoughts exactly), and it’s a cute little rickroll of an adventure flick with Pro-Nazi Chuck Darwin leading the hoary brigades on a fell mission of genocide and eugenics. Only problem is, it’s a big fat fart-sucking lie. Unfortunately for Mister Stein, he got all of his facts wrong. Well, nearly all, as the credits (both opening and closing) do appear to be accurate.

Here, then, is Scientific American’s John Rennie and Steve Mirsky, reporting on the pitiful, outright lies perpetrated in this ridiculous movie.

Categories
current events uncategorized

unholy thing

Oh my god. This creepy, unthinking mechanical thing is the precursor to the terrible things that will replace us. I, for one, welcome them with open arms.

Categories
life uncategorized

changes, and nicotine slavery

When you finally get to that point where you can start to FEEL the change, the in-process reinvention of your Self becomes evident, and you realize that, in at least some respects, metaphysical or not, you are becoming truly free. You start to understand that even the chains of your own past can be lifted off and you can become someone else – who is still you but yet new, emergent, and refined.

Think about all the cells and microorganisms of your body. After a period of several years, each and every little bit of you has eventually been replaced. You are a constantly renewing fountain of change. You are not even the you that you were when you were a child. You are someone else, a replicant, and yet, you are you, just… the new you. (What makes us who we are anyway?)

Incidentally, the reason why our memories from so long ago are so cloudy and errant is that we are merely xeroxed copies of ourselves. All the atoms in your brain have been replaced or reconfigured a few times by now. It makes sense that some files are illegible or missing altogether.

As long as you are becoming anew, think about ways you can help not the process but the results.

For smokers: this thing can be beat. I am 99% of the way there myself, and i have tried and failed just like you no doubt have. Although we may never be non-smokers, it is absolutely possibleand a whole lot easier than you might think – to become an ex-smoker.

Don’t listen to anybody but your body.

Even your mind concocts labyrinthine machinations silently against you. Fear is just another formulaic and substance-deprived bestseller. Write your own middle and end, even if someone else already wrote your beginning.

Okay that last bit was a little tongue-in-cheek, but think about it even still.