Style your HTML tables

I use the following CSS on my TR of TBODY in a table to help user to identify rows under inspection. On mouse over the row turns to light green and on double click it holds an orange color helpful for comparing rows.

I hate to add any intrusive JavaScript libraries and keep my table very simple.

onmouseover=”if(!=’orange’){’lightGreen’;}” onmouseout=”if(’lightgreen’){”;}” ondblclick=”if(’lightgreen’){’orange’;}else if(’orange’){”;}”


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s