View Single Post
Old 04-11-2008, 11:04 AM   #1 (permalink)
Costin Trifan
v7n Mentor
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania
Posts: 2,968
iTrader: 0 / 0%
Latest Blog:
Ok, so we're back

Costin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web pro
Share your JavaScript tips [and tricks]

If you have some JavaScript tips and tricks you might like to share, than this is a good place to start!


My #1:
Use expression method to set up individual css styles for Internet Explorer browser only:

Code:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style type="text/css"> P#paragraph { color: #009933; /* Green */ color: expression('#FF0000'); /* Red --> IE ONLY */ } </style> </head> <body> <p id="paragraph"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </body> </html>
If you run this code in multiple browsers you'll see that the paragraph shows up red only in IE, and green in all others.
Costin Trifan is offline   Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links