Log in

View Full Version : CSS filter not working



usp
02-27-2008, 11:09 AM
i tried out various css filter examples as shown in some of the websites. But i'm unable to see the desired result.

html code is as follows :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.shadow {
height: 1em;
filter: Shadow(Color=#666666,
Direction=135,
Strength=5);
}

-->
</style>
</head>

<body>
<span class="shadow">PRIORI</span>

</body>
</html>

What is possibly going wrong. My IE version is6

Pls help

boogyman
02-27-2008, 02:54 PM
hello usp, welcome to the forums

Please review our Posting Policies (http://www.dynamicdrive.com/forums/showthread.php?t=24866) especially in regards to posting computer code #8

you shouldn't be using XHTML as IE doesn't support the format, you are really just parsing invalid HTML.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

look into the 4.01 Strict DOCTYPE

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

now as for your problem, I am not well versed in filters, however I know that they are proprietary to Microsoft and will only work on IE type browsers. whitespace should not matter, but try putting the declaration all on the same line


span.shadow {
height: 1em;
filter: Shadow(Color=#666666,Direction=135,Strength=5);
}

BLiZZaRD
02-27-2008, 02:55 PM
Start here (http://www.ssi-developer.net/css/visual-filters.shtml) which lists all parameters for said filters.

Second is WHY? It is ONLY supported by IE, and most heinously at that.


Beat me too it Boogyman.. my apologies.