Solved

CSS Filter is stopped by background

Posted on 2010-11-17
4
175 Views
Last Modified: 2013-09-17
OK let's say I have this

.test {
filter:DropShadow(Color=#000000, OffX=1, OffY=1);
}

Open in new window


Yes, it works fine. The text-shadow appears in Internet Explorer. However... if I add a background for color like so:

    .test {
    filter:DropShadow(Color=#000000, OffX=1, OffY=1);
    background:#ffffff;
}

Open in new window


Can you guess what happens? The filter goes way! However, if I ,once again, remove the background property... the filter (text-shadow) comes back!

Help?
0
Comment
Question by:UrbanTwitch
4 Comments
 
LVL 30

Expert Comment

by:LZ1
ID: 34159127
Have you read this?

http://msdn.microsoft.com/en-us/library/ms532985%28v=VS.85%29.aspx 

Try this:
<!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=utf-8" />
<title>Untitled Document</title>
<style> 
.test {
filter:DropShadow(Color=#000000, OffX=1, OffY=1);
color:#36f;
}
.test2{
    filter:DropShadow(Color=#000000, OffX=1, OffY=1);
    background:#ffffff;
   color:#36f;
}
.test3 {
	filter:
    progid:DXImageTransform.Microsoft.MotionBlur(strength=4, direction=310);
        background:#ffffff;
}
</style>
</head>

<body>

<div class="test">  TEST  </div>
<div class="test2"> TEST 2 </div>
<div class="test3"> TEST 3 </div>
</body>
</html>

Open in new window

0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 500 total points
ID: 34160527
The shadow effect of the "filter" does not work against a background image or color.

What you should be using is GIF images with shadows for this floating effect.

If you want to design universal web pages for all users to see, do NOT use these quirky M$ concepts.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question