Thanks to
Vincent Liu and
Ryan Michney I was able to incorporate random rotating header images for my
blog.
A number of the old St Vincent’s Hospital photographs have been retouched, taking many hours. In total there are nine 900 by 250 pixel images named banner_0 to banner_8, and if anyone would like to add to my collection, I’d be pleased as punch to include them in my header. Through trial and error it was accomplished by combining the
first part of Ryan’s code, without the image padding, in order to make the header image clickable back to my homepage, and
Vincent’s JavaScript code that’s marked in
red with the addition of
!important after
block in the first
style code. The code was then placed in my blogger template according to Vincent’s instructions.
Those that have not enabled
JavaScript will just see my original header image – the one with the Sydney Harbour Bridge and the white Cockatoo in it! A copy of that is included in my random rotating header images.
Note: In the last 12 months 8.37% of my visitors don’t have Java enabled so I thought it best to go with this method instead of using a transparent gif in my header element as outlined in option two below. My test blog reveals the code works in all popular browsers, although if you refresh the page (F5) or click on a post title in quick succession the header image repeats itself, with the same occurring with other techniques I tried and seen. Overall I’m delighted and all congratulations must go to Vincent and Ryan, so well done boys and many thanks from me!
For other ideas,
Tom Debski (aka Spavel), Top Contributor and Official Blog*Star from the Blogger help forum has
option one and
option two that are well worth looking at.
Any feedback is welcomed and if anyone out there can improve on what I have implemented please let me know. Now, if you try this, remember to back up your blogger template beforehand. Now what have I been up to other than pulling my hair out getting my random rotating header images to work?
Let me count the ways:
1. We’ve completed 99.9% of the home renovations.
2. Getting over my upper right leg stress fracture & damaged lower femur.
3. I’ve just started on the garden makeover in preparation for my sons wedding.
4. I’ve spent quality time with my grandchild & my son’s soon to be in-laws.
5. I’ve contemplated never visiting a hardware and paint shop ever again.
| You might also like: |
| Ryan Michney's random rotating banners for Blogger-beta | | | | Vincent Liu's rotating image banners for blogger | |
| | | |
| |
Read more...