When the screen size is decreased, the CSS borders drop shadow becomes visible

Currently, I am in the process of designing a header for a website. Everything seems to be going smoothly when viewed on my regular, full browser width, displaying exactly as intended, similar to this. However, upon resizing the screen to half its width, an unexpected issue arises: a black bar appears, visible at https://i.sstatic.net/69g6G.png. Despite my attempts to use inspect element and identify the source of this problem, locating the root cause of the dropshadow effect has proven to be quite challenging.

Below is the accompanying CSS code:

div#header {
        background:#41038e;
        min-width: 100%;
        height: 175px;
        margin: 0;
        padding: 0;
        z-index: 1;
        box-shadow: 0px 5px 5px -5px #666;
}
div#white-background {
        min-width: 100%;
        height: 125px;
        background:#FFF;
        padding: 0;
        z-index: -1;
}
div#header-inner {      
        width: 1200px;
        height: 200px;
        margin: 0 auto;
        padding: 0;
        z-index: 1;
 }
 div#logo {
        height: 100px;
        padding-top: 25px;
        margin: 0 auto;
        width: 1200px;
  }

The corresponding HTML snippet can be found below:

       <div id="white-background">
                <div id = "logo"><!--begin logo-->
                    <h2>The Cupertino Florist</h2>
                    <!--<img src="img/logo.png" />-->
                </div><!--end logo-->
             </div>  

Answer №1

Implement the following code snippet.

header {
    background-color: #41038e;
    width: 100%;
    height: 175px;
    margin: 0;
    padding: 0;
    box-shadow: 0 5px 5px -2px #666;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Angular service provided by MetronicApp

I've been working on integrating Angular services with the Metronic App. This is how I defined my service: angular.module('MetronicApp').service('shaperService', ['$http', function ($http) { this.shapers = function(param ...

JavaScript Drag-and-Drop Statement Issues

Currently working on a JavaScript game that utilizes the drag and drop feature of HTML. The goal is to make randomly generated fruit images draggable and droppable onto a jelly image. When the dragged image matches a certain condition (e.g., when the numbe ...

Steps to activate overflow on `react-bootstrap` NavDropdown

I'm having a bit of trouble with using react-bootstrap's NavDropdown in my NavBar to display a list of data. Sometimes, the list extends beyond the view and gets cut off at the bottom. I want to add overflow: auto to the list to make it scrollabl ...

Interacting with the Dropdown feature on the page causes the body of the page to shift

I am encountering an issue with 2 dropdowns in Datatables used to filter content. The problem arises when a dropdown is positioned on the right side of the page, causing a shift to the left by approximately 10px. Conversely, if the dropdown is placed on th ...

What is causing the align content property to not function as expected in this situation?

Is it expected for the flex items of the .center-section-container to be closer together when using this property? They do not seem to be affected at all. I have applied flex wrap so the items are now in different lines but too far away from each other, I ...

Tips for preserving changes made to a jQuery script when the page is reloaded

Is there a way to retain jQuery script changes when the page is reloaded? I have a page where clicking on certain elements triggers events, and I want these changes to persist even after reloading the page, resetting only when the cache is cleared. I appre ...

The error message "Vuex-persist encounters an Uncaught TypeError: s is not a function" is

Can someone help me with this code issue? Here it is: I'm not sure what the exact problem is, but maybe someone can point me in the right direction! const vuexLocal = new window.VuexPersistence.VuexPersistence({ storage: window.localStorage, }); con ...

Top tip for combating form misuse in Django applications

Is there a reliable method to restrict form submissions in Django? I need the form to be submitted a maximum of 5 times from the same IP address within one hour. Can this restriction be implemented in Django? I experimented with Django Ratelimit, but unfo ...

A CSS rule to display a nested list on the left-hand side

I created a menu that you can view here. When hovering over "tanfa demo example," the sublist appears on the right side. The issue I'm facing is that my menu is positioned all the way to the right, which means the sublist also appears on the extreme ...

Leveraging the Railway Pathway from the Google Maps API

I need to customize my map to display only railway stations instead of the entire map. How can I achieve this? Below is the code I have attempted: <html> <head> <style type="text/css"> html { height: 100% } ...

Create a layout consisting of two rows, each containing three blocks. Ensure that the layout is responsive by using only HTML and CSS, without relying

Hello there! I am looking to create a responsive layout without using bootstrap or any other framework..... I want to build it from scratch. https://i.stack.imgur.com/GAOkh.png I am aiming for responsive blocks that collapse into one column when the page ...

The dropdown height feature is experiencing issues in the Chrome browser

3 radio buttons and a single select box are displayed on the page. When clicking on the first radio button, the select box should show contents related to the first radio button. However, when selecting the second or third radio buttons, the select box hei ...

Troubles with the placement of the navbar icon in responsive design

After following a tutorial on responsive navigation bars (https://www.w3schools.com/howto/howto_js_topnav_responsive.asp), I successfully implemented the navbar on my website. However, I encountered an issue with the icon placement when clicked. Here is ho ...

Update the value of an ASP textbox using JQuery, and ensure that the .Text property accurately reflects the new value

After searching extensively, I still haven't been able to find a solution to my problem. I am facing an issue with updating a readonly Textbox in ASP.NET using JQuery after selecting radio buttons. The value displays correctly and everything seems to ...

Decoding XML using AJAX: Picture Link: Does not exist?

Seeking assistance with parsing xml and returning it as needed. Unfortunately, I am unable to retrieve the image link. Can anyone provide help? Here is my code snippet or you can check it out on http://jsfiddle.net/4DejY/2/: HTML <ul data-role="listvi ...

Stop the stutter in Chrome caused by scrolling animations

I'm encountering a delay with the scroll.Top() function. This issue is specific to Google Chrome on Desktop. Here is the jQuery code I am using: $('html, body').animate({ scrollTop: $('#second').offset().top-140 }, 'slow&apos ...

The dynamic combination of jCarousel, jQuery Accordion, and fade in effects

Take a look at this link www.aboud-creative.com/demos/mckinley3. You'll find a jQuery Accordion with jCarousel inside the "Developments" section. I have implemented a standard fadeIn function for the logo, accordion, and a stag on the bottom right to ...

How to apply background images to LI elements using CSS

I've been experimenting with CSS-generated tabs to display an active state of an arrow underneath the tab. I tried using the background position properties to position the image for the hover event, but it would extend beyond the predefined boundaries ...

Place the delete and edit buttons on the right side of the card

I am trying to align the edit and delete buttons with the image and premise name on the same line. Both buttons should be placed on the right side and have the same size as the card. Currently, the layout looks like this: https://i.sstatic.net/sNikU.png ...

Create dynamic animations using AngularJS to transition between different states within an ng-repeat loop

Here's a simplified explanation of my current dilemma: I have an array containing a list of items that are being displayed in an Angular view using ng-repeat, like... <li ng-repeat="item in items"> <div class="bar" ng-style="{'width ...