Posts Tagged ‘CSS’

Zebra Striping HTML tables with JavaScript

Sunday, October 11th, 2009

Here is a simple JavaScript solution for making alternative rows of your HTML table different colours.

(more…)

JavaScript’s window.onunload resolves css display issue in IE and Opera

Tuesday, September 29th, 2009

I noticed a rather odd issue in Internet Explorer (IE) and Opera, where by a HTML element whose visibility is toggled on and off (using a CSS class via JavaScript mouseover/out event listeners) stays visible when clicking the browsers BACK button.

Rather than reloading the page and thus rendering the element as hidden (until the user rolls their mouse over the relevant area to make the hidden element visible again), the element was visible immediately. I think this has something to do with how these browsers call the previous page’s content, maybe from some kind of cache? (if someone can enlighten me on why this happens in only these two browsers – Mozilla Firefox, Google Chrome and Apple Safari all worked fine – I would be grateful).

(more…)

GZIP your HTML, CSS and JavaScript with PHP

Monday, August 24th, 2009

I have been trying to improve my website optimization score within Yahoo‘s “YSlow” Firebug plug-in and have been struggling with the section regarding GZIP‘ing.

To make things worse there didn‘t seem to be any useful articles on how to do this with just server-side code (such as PHP or ASP.NET etc), the only articles I could find were all related to how to GZIP content by changing settings on the server itself – which is useless if you‘re on a shared hosting platform and even more useless for me as the examples were ALWAYS based on the user having an Apache based web server (my site is hosted on a PHP enabled Windows server!)

(more…)