Solved

CSS Filter is stopped by background

Posted on 2010-11-17
4
181 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

752 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