Solved

CSS Filter is stopped by background

Posted on 2010-11-17
4
172 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now