The frosting glass effect blur filter is malfunctioning, resulting in no blurring effect and affecting the content

I need help achieving a background photo with a div in front, featuring a blurry dark background with white text.

Currently, the setup shows a dark background without blur and dark text. Can someone please assist me?

#section0 {
background-color: lightgreen; /*normally the photo*/
}

.blurwrapper {
position: relative;
overflow: hidden;
}

.blur {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: black;
filter: blur(1px);
opacity: 0.2;
transform: scale(1.5);
z-index: 1;
}

h1 {
color: white;
}
.about {
color: white;
background: none;
margin: auto;
margin-top: 20px;
max-width: 800px;
font-size: 15px;
padding: 20px;
text-align: center;
letter-spacing: 2px;
color: white;
border-top: 1px solid white;
z-index: 2;
}
<div class="section active" id="section0">
    <div class="blurwrapper">
      <h1><span>...</span></h1>
      <p class="about">...</p>
      <div class="blur"></div>
    </div>
</div>

Answer №1

Applying the blur filter to the current element will result in blurring that element. To blur an image, apply the blur filter to the #section0 container with the background-image set. If you have a solid color instead of an image, only the border will appear blurred.

For more detailed information, refer to the documentation at: https://developer.mozilla.org/en-US/docs/Web/CSS/filter

For a clearer example using your code, visit: http://codepen.io/ThePeach/full/egYbbe/

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

Highlight the phrase "figure x" within the paragraph to emphasize its importance

I want to emphasize figure 1, figure2, ...all the way up to figure 111. I am limited to making changes in HTML and CSS only, without using JavaScript or jQuery. Is there a different method than just inserting <strong> in the HTML? In CSS, we have : ...

Fetching the entire webpage

When attempting to load a specific webpage using an iframe, I encountered the following issue: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></ ...

Information from contact forms gets inputted into the URL

Currently, I am in the process of developing a website and implementing a Contact Form that allows customers to email me directly. To test if the mail function is working correctly, I am using a Test Mail Server listening on Port 25 through a WAMP server v ...

Color the area entirely in black

I am currently working on a project for one of my courses, where I have created a website for a specific service. However, I am facing some challenges and things are not going as smoothly as I had hoped. Here is a screenshot of the page: https://i.stack.im ...

Eliminate any iframes that have a src attribute with the value of "some_src.com/....."

I'm brand new to coding in javascript. I've noticed that there is an annoying ad popup that manages to sneak through Adblock super without being detected. It's driving me crazy and I want to block it! Here's the code for the iframe: IF ...

The CSS styling for a pie chart does not seem to be functioning properly when using jQuery's

https://i.stack.imgur.com/kEAKC.png https://i.stack.imgur.com/03tHg.png After examining the two images above, it appears that the CSS is not functioning properly when I try to append the same HTML code using JavaScript. Below is the snippet of my HTML co ...

Vuetify 3 now displays full text in v-autocomplete without an ellipsis

Trying to truncate long text in a v-autocomplete component using Vuetify 3 and text-overflow: ellipsis, but it's not working. Check out the code below: <div id="app"> <v-app id="inspire"> <v-row align="cen ...

The Bootstrap Navbar is causing the navigation bar to span across two lines

I'm having an issue with my navbar taking up two lines on desktop resolution, but fitting perfectly on mobile. I've spent hours going through the code with no success. Any help would be greatly appreciated. The HTML code is provided below. <! ...

Failed validation for Angular file upload

I attempted to create a file validator in the front end using Angular. The validator is quite straightforward. I added a function onFileChange(event) to the file input form to extract properties from the uploaded file. I then implemented a filter - only al ...

Transforming JQuery code into pure Javascript: Attaching an event listener to dynamically generated elements

After exhausting all available resources on stack overflow, I am still unable to find a solution to my problem. I am currently trying to convert the JQuery function below into Vanilla JavaScript as part of my mission to make web pages free of JQuery. How ...

Issues with click events in the navigation menu

How can I make my menu close when clicking on other parts of my website, instead of opening? I know that I should use a click event for this, but when I implemented a click event, my menu encountered 2 unwanted problems: 1- Whenever I clicked on a menu i ...

Tips on utilizing a single modal to showcase various images

Based on the database table rows, my page will be populated with multiple rows (currently 32). Each row includes an image and a button/link at the end. I need a popup (#modal) to display the image fetched from the database when the button is clicked. I wa ...

My Jquery "animate" is only triggered once instead of on each function call. What could be causing this issue?

I have set my navigation to dock at a specific document height on the top of the viewport, and when it docks, it should display a dropdown animation. $(document).scroll(function(){ var x = $(window).scrollTop(); if(x>=700){ $("header ...

Creating a dynamic 2x2 grid with centered responsiveness in Angular Ionic framework

I'm having trouble achieving a 2 x 2 grid that is centered on my screen. The code snippet below shows what I have so far in the HTML file. Just to provide some context, this project is meant for a native mobile application. <ion-header> <i ...

Linking all styles with Angular 2

Is it possible to apply a style when the exact nature of that style is unknown? Consider a scenario where I have a model containing string variables defining styles, as shown below: myStyle1:string="margin-left:10px"; myStyle2:string="margin ...

The div needs to be positioned above another div, not beneath it

Just returning to the world of coding and struggling with a basic problem. Any help would be greatly appreciated. I am trying to position the 'header-top' (red) div at the top, and the 'header-bottom' (blue) div at the bottom. However, ...

Is it possible to apply a click effect to a specific child element of a parent using jQuery?

Struggling to figure out how to modify this jQuery code so that only the parent of the clicked button displays its child. Currently, all children are displayed when any button is clicked, not just the one within the targeted parent. I attempted using $(t ...

Change the color of this element and input field background

Having trouble with setting the background color of an input field to red in this code: $(document).ready(function(){ $(".abc").focus(function(){ $(this).attr('background', 'red'); $("label").text('Insert tex ...

Aurelia TypeScript app experiencing compatibility issues with Safari version 7.1, runs smoothly on versions 8 onwards

Our team developed an application using the Aurelia framework that utilizes ES6 decorators. While the app works smoothly on Chrome, Firefox, and Safari versions 8 and above, it encounters difficulties on Safari 7.1. What steps should we take to resolve th ...

Tips for Validating Radio Buttons in Angular Reactive Forms and Displaying Error Messages upon Submission

Objective: Ensure that the radio buttons are mandatory. Challenge: The element mat-error and its content are being displayed immediately, even before the form is submitted. It should only show up when the user tries to submit the form. I attempted to use ...