Maximizing the Width of a Background Image in Wordpress Elementor for a Full Screen Effect

UPDATE: Issue Resolved! See the comments for details. Thanks to the helpful Dev!


I'm facing a challenge with my website's homepage design. I'm trying to incorporate a background image that spans the full width of the screen. My website is built on WordPress with Elementor.

Despite multiple attempts, I haven't been successful in achieving the desired result of filling the full screen width while maintaining the correct image height to preserve the aspect ratio.

Unfortunately, a portion of the image on the right side is being cropped out.

Here's the code snippet I've used:

<div id="kunstplein1920"></div>

#kunstplein1920 {
background: url(imageURLhere);
background-repeat: no-repeat center fixed;
background-size: cover;
min-width: 1920px;
min-height: 603px;}

Any assistance or suggestions would be greatly appreciated! Thank you in advance. :)

Best regards,

Joris

Answer №1

Have you attempted including

width: 100% in your code?

This should solve the issue.

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

Is it feasible to place an image on top of a box?

Hello everyone, I have been trying to figure out how to achieve a specific layout in React. I am using MUI so there is no need for any hard-coded CSS. However, my attempts have not been successful so far. The layout I am aiming for consists of an image on ...

Breakpoint for mobile menu in FoundationCSS

When the browser is resized, the mobile menu appears at 568x320, which is the default breakpoint. https://i.sstatic.net/ZSbiq.jpg I would like to create a breakpoint around 900px to address the issue with the menu being too large as shown in the image be ...

Detecting collisions with spheres using Three.js Raycaster

I came across an example from a previously answered question on this site: Three Js Object3D Button Group Detect Single Object Click While Mouse Movement Causes Object3D Button Group Zoomi As I tried to customize it to fit my needs, I encountered a few is ...

Can anyone recommend a high-quality jQuery lightbox replica?

Key Features Needed: Customizable with CSS Capable of handling forms, not just images Extensively documented Please provide any recommendations and suggestions for suitable options. Thank you in advance ...

Understanding the concept of for loops in JavaScript and incorporating them in CSS styling

Hello there! I initially used this code to draw 12 lines, but now I am looking to incorporate a for loop and implement it in CSS. Can someone please guide me on how to proceed? <!DOCTYPE html> <html> <head> <style> #straigh ...

Animating the navbar with CSS transitions

https://i.sstatic.net/cV3X6.png Seeking advice on adding a transition effect to my navbar. Specifically, I'd like to have a colored background appear below each link when hovered over. For example, when hovering over "HOME," a yellow color should dis ...

Tips on creating a dropdown menu with a fontawesome icon

I'm brand new to coding and struggling to create a drop-down menu similar to the one used in fonawsome fa fa-ellipsis-v While I'm attempting to code it here, I'm not sure why the class is being overridden. *{ margin: 0; padding : ...

CSS animation triggers filter transition malfunction in Google Chrome

My HTML contains several <a> tags that have different images as backgrounds. I want these <a> elements to move across the page in an animated manner and have a grayscale filter applied to them. When hovered over, they should return to their ori ...

Switch the input direction from left to right

Check out my demonstration that is currently functional: JSFIDDLE $('#btn-search').on('click', function(e) { e.preventDefault(); $('#search').animate({width: 'toggle'}).focus(); }); Is there a way to modify ...

Styling for Print Media: Adjusting the horizontal spacing between inline elements

I have been developing a custom AngularJS point-of-sale (POS) system that requires printing receipts upon completing a sale. To achieve this, I am using ng-print to print out a sales summary displayed within a specific div element after hiding all other un ...

PHP do-while loop triggers out of memory error while running SQL query code

While running the code below, the website crashes with the error: "Allowed memory size of 268435456 bytes exhausted (tried to allocate 254643 bytes)" $queID = "LCGQ00" . $ID; $sqlquecheck = "Select QueryID FROM Questions Where QueryID = & ...

Are CSS generated elements limited to text content only?

Can CSS generated content be used for more than just text? Take for example the code snippet below, where the span is displayed as text rather than creating a new span element. .addbefore:before { content: "<span>dfsd</span>"; } ...

Child element does not follow z-index rules

I have a website Suoi Hong Resort However, the menu block displays behind the logo. The navigation class has a position of absolute and a z-index of 3. The logo has a position of absolute and a z-index of 2. The menu block has a z-index of 10. Despite th ...

The jQuery .each function is malfunctioning specifically on Google Chrome browsers

I developed a web application that utilizes jQuery to automatically submit all forms on the page. The code snippet is as follows: $('form').each(function() { $(this).submit(); }); While this functionality works perfectly in Internet Explore ...

Create an immediate impact by injecting CSS

I currently have the following code set up: style.js: function applyStyle(str) { var element = document.createElement('style'); element.innerHTML = str; document.body.appendChild(element); } var style = 'body {' style ...

Ways to navigate to a tabbed section that is currently inactive

One of my challenges involves managing a tabbed form with multiple tabs: <ul class="tab-links"> <li class="active"><a href="#tab1">Pending</a></li> <li><a href="#tab2">All</a></li> ...

Arrange the items in the last row of the flex layout with equal spacing between them

How can I arrange items in rows with equal space between them, without a large gap in the last row? <div fxFlex="row wrap" fxLayoutAlign="space-around"> <my-item *ngFor="let item of items"></my-item> </div> Current Issue: htt ...

Utilizing Nesting in Less-CSS: Unleash the Power of Greater Than Sign

When working with LESS-CSS, you can achieve the same result with the following code: .a { .b { font-color:red; } } or you can use the nested selector directly like this: .a .b { font-color:red; } But is there a way to target only direct child ...

Strangely shaped border appears when interacting with editable div block

I am attempting to build a textarea that has the capability to display multiple colors. To achieve this, I created a div and used the following JavaScript code: element.unselectable = 'off'; element.contentEditable = true; Now, the div can be e ...

The parent element of a 3D div is causing issues with hovering and clicking on the child elements

In my scenario, the parent div is transformed in 3D with rotation, causing it to move to the backside. The issue arises with the child div containing a button that becomes unclickable due to the parent div position. Setting backface-visibility to hidden al ...