[ Updated threads · New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
8 Javascript solutions to common CSS problems
guitarmantraDate: Thursday, 2009-06-04, 7:18 AM | Message # 1
Group: Administrators
Messages: 220
Awards: 3
Reputation: 2
Status: Offline
CSS are definitely a great technique for web designers and web developpers. Though, cross-browser problems and lack of CSS3 support in modern browsers are a real problem for your creativity. Today, I have compiled a list of 8 common CSS problems that you can easily resolve with help from Javascript.

1- Transparent backgrounds with JQuery

Ah, transparent backgrounds. Due to the fact that IE6 can't handle transparent png images, this has been a problem for years. Although many techniques are availables in order to solve this recurring bug, this one is really good because it allows you to make any element transparent, without even using transparent png files.

Download theses files and include them in your website: ... 2.6.min.js ... .plugin.js
Adapt the following code to your own needs and paste it in the head part of your html document, or even better, in a separate .js file. Basically, Just use the transBGdraw() function on each element you'd like to make transparent



// !!!IMPORTANT!!!
// if you use tagnames or classes, make sure every object affected has a unique id.
{ $(this).transBGdraw(); });

{ $(this).transBGdraw(); });

{ $(this).transBGdraw(); });

{ $(this).transBGdraw(); });

{ $(this).transBGdraw(); });

You're done. Easy, isn't it?
Attachments: 4361943.jpg (20.4 Kb)
  • Page 1 of 1
  • 1