menu
[ Updated threads · New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
Coredownloadz Forum » Web developments » Programming Softwares » 8 Javascript solutions to common CSS problems
8 Javascript solutions to common CSS problems
guitarmantraDate: Thursday, 2009-06-04, 7:18 AM | Message # 1
Colonel
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:
http://jqueryjs.googlecode.com/files/jq ... 2.6.min.js
http://design-forge.ro/projects/opensou ... .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

Code

$("#id").transBGdraw();
$("#menu").transBGdraw();
$("#container").transBGdraw();

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

$("h6").each(function()
{ $(this).transBGdraw(); });

$(".class1").each(function()
{ $(this).transBGdraw(); });

$(".text").each(function()
{ $(this).transBGdraw(); });

$(".information").each(function()
{ $(this).transBGdraw(); });

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


www.coredownloadz.ucoz.com
 
Coredownloadz Forum » Web developments » Programming Softwares » 8 Javascript solutions to common CSS problems
  • Page 1 of 1
  • 1
Search: