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

  • SEARCH
  • Home
  • 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 7716351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:36:54+00:00 2026-06-01T02:36:54+00:00

i am trying to style a div with box-shadow and gradient cross-browsed. I am

  • 0

i am trying to style a div with box-shadow and gradient cross-browsed. I am using sass & compass.So,i try to implement mixins that will help me generate that effect and reuse it everywhere i want. Unfortunately ,only gradient is shown.
my div is:

<div class="container" id="logo-bar">
  ......
</div>

my scss code is :

    @mixin ie-linear-gradient($start-color, $end-color) {
      filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#    {$start-color}', endColorstr='#{$end-color}');
      -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$start-color}', endColorstr='#{$end-color}')"; 
}
    @mixin ie-box-shadow ($color, $direction, $strength) {
      filter: progid:DXImageTransform.Microsoft.shadow(color='#{$color}', Direction=#{$direction}, Strength=#{$strength});
      -ms-filter: "progid:DXImageTransform.Microsoft.shadow(color='#{$color}', Direction=#{$direction}, Strength=#{$strength})";
}

#logo-bar {
  padding:5px 0;
  border-bottom: 1px solid #c0c0c0;
  @include single-box-shadow(#e0e0e0,0px,1px,2px,false,false);
  @include ie-box-shadow(#e0e0e0,90,2);
  background: #fefefe;
  @include background-image(linear-gradient(top, #fefefe, #E6E6E6));
  @include ie-linear-gradient(#fefefe, #E6E6E6);
  min-height:1px; /* for IE 7 to show gradient */
}
  • 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-01T02:36:55+00:00Added an answer on June 1, 2026 at 2:36 am

    Unfortunately, you cannot do this with any version of CSS (or a css compiler) in the manner you want.
    From http://www.css3please.com

    Multiple IE filters must be comma delimited in a single declaration.
    They are not additive in separate blocks.

    So you’d have to have

    filter: {{your boxshadow filter}}, {{your gradient filter}};
    

    not

    filter: {{your boxshadow filter}};
    filter: {{your gradient filter}};
    

    which is what your CSS will get translated to on the browser end.

    As with all CSS definitions in a single ruleset, the last one defined wins.

    I would suggest creating more mixins that combine the effects in the desired manner. For example, have a mixin for boxshadow, one for gradient, and one for boxshadow with gradient. Not the most elegant solution, but it doesn’t seem possible with IE any other was with CSS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

trying to implement a dialog-box style behaviour using a separate div section with all
I'm trying to generate a dynamic table using CSS: <html> <head> <style> div.el1, div.el2
I am trying to style an input-box rendered using jEditable . I want to
I am trying to style a background of a div by using a top
I'm trying to style all <select> elements that are a descendant of a <div>
I'm trying to make Javascript change the style of certain DIV IDs by changing
I'm trying to set the style name of the div of the split between
I am trying to fade a box in by using an image with a
I'm trying to create a div in HTML and then in a separate style
I am trying to add gradient on only .link.box.gradient but in ie7 it add

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.