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 8802451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:05:38+00:00 2026-06-14T01:05:38+00:00

Style: #logo { position: absolute; top: 14px; left: 14px; width: 120px; height: 72px; background-color:

  • 0

Style:

#logo {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 120px;
    height: 72px;

    background-color: #abc;
    color: black;
    outline: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.75);

    /* The background image is set inline */
}

JSFiddle:

http://jsfiddle.net/CF7P2/

Chrome:

Chrome

FireFox:

FireFox

Why is the FireFox version drawing the margin so far away from the box? Can I stop it from doing so, or can I achieve the same visual result using some other method?

  • 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-14T01:05:39+00:00Added an answer on June 14, 2026 at 1:05 am

    In Firefox, box-shadow pushes outline outward. (Not sure if by bug or by feature…)

    Method 1

    I’d achieve what you’re trying to do by wrapping it in another div, and applying the box-shadow to that.

    Like so:

    Fiddle

    <div id='logo_wrapper'> ... </div>
    
    <!-- -------------------- -->
    
    #logo, #logo_wrapper {
        width: 120px;
        height: 72px;
    }
    #logo_wrapper {
        position: absolute;
        top: 14px;
        left: 14px;
        box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.75);
    }
    #logo {
        background-color: #abc;
        color: black;
        outline: 1px solid rgba(255, 255, 255, 0.2);
    
        /* The background image is set inline */
    }
    

    Method 2

    You can use outline-offset and a Firefox CSS hack if you do not wish to use the wrapper div. Now, please do not ask why I used 21px instead of 15px; I got to that value by testing… it should have worked with 15px.

    Fiddle

    body {
        background-color: #444;
    }
    
    #logo {
        position: absolute;
        top: 14px;
        left: 14px;
        width: 120px;
        height: 72px;
    
        background-color: #abc;
        color: black;
        outline: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.75);
    
        /* The background image is set inline */
    }
    #logo, x:-moz-any-link {
        outline-offset: -21px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got this div..: <a href=/><div id=logoCover style=position: absolute;width: 341px;height: 100px;z-index: 9999;top: 0px;left:
/* Style 1 */ .myclass { background:#ff0; border:1px solid #ff0 } #myid { width:80px;
How does the logo in the top left corner of the screen gradually change
How do I style width for -webkit only? All of my select boxes are
on the left side of my page I have a logo and a list
I'm trying to position a div that contains a logo (the one in orange,
I'm trying to get my background image to show at the top center of
I have the following code <html> <head> <title>Test</title> <style type=text/css> <!-- body,td,th { color:
I have this HTML code: <div id=logo> <div id=left-block> <h1>Title goes here</h1> </div> </div>
.getProperty(style) outputs TestObject(Ref:RemoteProxyReference{testContext:af4e390002a336, objectId:3171, testObjectClass:TestObject}) while to[0].getProperties() outputs text hash where key style is

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.