Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9242081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:30:23+00:00 2026-06-18T08:30:23+00:00

I want to apply a simple drop shadow to an SVG file. As this

  • 0

I want to apply a simple drop shadow to an SVG file. As this is really my first dive into SVG filters, I am stuck and can’t find a solution for the (probably simple) problem: Why is the feColorMatrix not being applied to the shadow?

Here is the filter:

<defs>
  <filter id="drop-shadow" filterUnits="userSpaceOnUse" width="120" height="120">
    <feGaussianBlur in="SourceAlpha" result="blur-out" stdDeviation="1" />
    <feOffset in="blur-out" result="the-shadow" dx="0" dy="1"/> 
    <feColorMatrix in="the-shadow" result="color-out" type="matrix"
      values="0 0 0 0   0
              0 0 0 0   0 
              0 0 0 0   0 
              0 0 0 0.1 0"/>
    <feBlend in="SourceGraphic" in2="the-shadow" mode="normal"/>
  </filter>
</defs>

Also, is it possible that FireFox ignores feOffset? Or is there something wrong with the syntax?

Plus: In all browsers, the drop shadow seems to be clipped off at the top and on the left side. The svg (in an img tag) is 22px x 22px big and I already enlarged the viewBox:

<svg version="1.1" id="Layer_1"
  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
  y="0px" width="22px" height="22px" viewBox="0 0 24 24" enable-background="new 0 0 24 24"
xml:space="preserve">

But still no luck. In my CSS file the the img has no set width or height, so I believe it has something to do with the SVG.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:30:25+00:00Added an answer on June 18, 2026 at 8:30 am

    1) Your filter region is probably too small. You can enlarge the default values (although the default values: (-10%, -10%, 120%, 120%) are usually enough for normal drop shadows.)

    2) Also – as Robert mentions – your final filter is not wired up correctly.

    Here is a version that seems to work consistently cross browser – exaggerated so you can see clearly.

      <filter id="drop-shadow" x="-20%" y="-20%" width="140%" height="140%">
        <feGaussianBlur in="SourceAlpha" result="blur-out" stdDeviation="2" />
        <feOffset in="blur-out" result="the-shadow" dx="0" dy="5"/> 
        <feColorMatrix in="the-shadow" result="color-out" type="matrix"
          values="0 0 0 0   0
                  0 0 0 0   0 
                  0 0 0 0   0 
                  0 0 0 .5 0"/>
        <feBlend in="SourceGraphic" in2="color-out" mode="normal"/>
      </filter>
    </defs>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to learn OpenCV and I want to apply this simple formula: That
Given a simple parent/child class structure. I want to use linqkit to apply a
I want apply margin property for my html newsletter But Gmail ignores this CSS
I want to apply a Storyboard to my Rectangle Fill like this: <Rectangle Name=MyRectangle
I have a simple string like this: image[2] I want to get the number
Here is the simple scenario that I want to apply; There is a .NET
I have a feeling that this question is very simple, but I just can't
I'm writing a very basic WPF dialog and want to apply a simple style
this is simple rectangle drawing code in opengl..i want to fill the rectangle with
I write a simple defun for a region, and I want to apply it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.