What could be the reason my slide background image isn't showing up?

I'm having trouble getting my slide background image to display properly. The file path is correct, so I believe the issue lies in the coding.

When slide one appears, I want my image to be visible, but currently, it's showing a white background instead of the image.

/* CSS for styling and fetching the image */

.slide-1 {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('media/image/slider/audi-black-car-8639.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
<div id="rev_slider_wrapper" class="rev_slider_wrapper fullwidthbanner-container">
  <div id="rev_slider" class="rev_slider fullwidthabanner" style="display:none;" data-version="5.0.7">
    <ul>
      <li data-index="slide-1" data-transition="fade" data-slotamount="1" data-easein="default" data-easeout="default" data-masterspeed="500" data-rotate="0" data-delay="6000">
        <img class="pic_slide_one" alt="slide-1" data-bgfit="cover" data-bgposition="center bottom">

Answer №1

Take a look at the code below, it's functioning perfectly. Remember to include the CSS in the class attribute of your HTML and ensure that the display is set to block instead of none.

.slide-1 {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('media/image/slider/audi-black-car-8639.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
<div id="rev_slider_wrapper" class="rev_slider_wrapper fullwidthbanner-container">
  <div id="rev_slider" class="rev_slider fullwidthabanner" style="display:block;" data-version="5.0.7">
    <ul>
      <li class ="slide-1" data-index="slide-1" data-transition="fade" data-slotamount="1" data-easein="default" data-easeout="default" data-masterspeed="500" data-rotate="0" data-delay="6000">
        <img class="pic_slide_one" alt="slide-1" data-bgfit="cover" data-bgposition="center bottom">

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

Error: The index.js file could not be located within the React application being used by Express with Node

I am having an issue with setting up my own express server for a React app in production. I keep getting a 404 error for the index.js file which contains my React js script. Here is the folder structure I am working with: server.js +public | index.html | ...

download image using React map method

I am trying to transfer an image from one useState variable to another when it is clicked const [photos, setPhotos] = useState([]); useEffect(() => { setPhotos(PhotoArray); }, []); This is the source image that I am using: export const PhotoArr ...

What are the steps to clipping a canvas using CSS clip-path?

When it comes to clipping a canvas, there are multiple methods that can be used. One way is to create a path with getContext('2d') and set globalCompositeOperation. Another method involves using -webkit-clip-path or clip-path, though the latter m ...

What are the steps to position this bootstrap drop-down menu above a fixed page header?

Could someone please advise on what changes need to be made in the code snippet below from http://jsfiddle.net/ufkkdbja/? I am looking to ensure that when the hamburger menu is clicked, the entire menu appears without being cut off by the fixed page header ...

Sending various options from an HTML form select element to a SQL query using PHP

My form includes a select box where users can choose pre-existing fields from a database: <form action='' method='POST' autocomplete='off' enctype="multipart/form-data"> <p><strong>Title and Description:& ...

Incorporate the text within the <i> element into your content

Is it possible to wrap text around a font-awesome element? I am encountering issues like the one shown in the link below: https://i.sstatic.net/BMTOT.png I would like the text to start from the top and seamlessly wrap around the font-awesome element. Can ...

In Firefox, resizable child elements in a flex container cannot be resized

Exploring the realm of flexbox has brought me to a bit of a roadblock with a layout like this one: https://jsfiddle.net/5b0pLgkj/ Everything seems to be running smoothly in Chrome and Safari, where children elements can be resized and fill up the availabl ...

Using Three.js to generate a CSS3DObject containing an HTML iframe from a different origin results in an error

The HTML code snippet below incorporates Three.js for creating a 3D scene and rendering it with CSS. It includes two separate HTML files: index.html and moo.html. <!doctype html> <html lang="en> <body> <script src="js/Three.js">&l ...

How can a specific button be disabled by using its id in Angular with Typescript?

There are 3 cards, each with a "Like" button. I have already written the code to detect their ids, but now I want to know how to disable the button that has been clicked and create a table in another component that displays the information of the button on ...

Manipulate Attributes in Javascript

Having an issue here - I'm trying to use JavaScript to set some attributes. for(i=0;i<div_navi.childNodes.length;i++){ if(div_navi.childNodes[i].nodeName =="SPAN"){ div_navi.childNodes[i].setAttribute("onclick","g ...

Ensuring elements are properly centered within a Bootstrap grid while adjusting the window size

I've been facing a challenge with making my web page resizable. Even though I managed to center the elements using margin properties, whenever I try resizing the browser window, the logo and ship images lose their positions. They end up falling out of ...

Increase the spacing between the scrollbar and the border

Looking to create some breathing room between the scrollbar and the right border of my text area. I've tried adjusting the margin-right/left values in -webkit-scrollbar with no success. Here's my style component: const FormTextArea = styled.texta ...

Outlook's text feature does not adhere to standard line-height specifications

While working on an HTML email, I encountered an issue with Outlook 2010. Here is the code snippet: <td background="images/11-text-1--alpha-d3c29e.jpg" bgcolor="#d3c29e" width="514" height="460" valign="top"> <!--[if gte mso 9]> ...

The transparency feature is malfunctioning in IE9 when using a background

This is a demonstration of a lightbox feature. You can find the code here. When you click on the link "Show Panel," a form will pop out. It works correctly in Firefox but not in IE9. The HTML code is simple: <body> <a id="show-panel" href="#"&g ...

Is there a way to extract the number from a b tag using selenium with Python?

I'm attempting to extract the numbers within all the <b> tags on this particular website. I am looking for each "qid" (question id), so I believe I need to utilize qids = driver.find_elements_by_tag_name("b"). Following suggestions fro ...

``Enhance your website with stunning Bootstrap 4 image cards that beautifully showcase

I'm having trouble creating 3 simple image cards with captions in Bootstrap 4. No matter what I do, the image keeps taking up the entire card and covering the caption below it. My cards should look similar to Bootstrap's example card, using the ...

Is there a way to specifically target the MUI paper component within the select style without relying on the SX props?

I have been experimenting with styling the Select MUI component using the styled function. I am looking to create a reusable style and move away from using sx. Despite trying various methods, I am struggling to identify the correct class in order to direct ...

Match the input fields with the corresponding table columns

Could you assist me in adjusting the alignment of my inputs? I am looking to position them above the last two columns ("Primary price" and "Secondary price"). To provide clarity, I have included a wireframe. https://i.sstatic.net/Zq983.jpg I attempted to ...

Sending information to a server using JavaScript

Greetings everyone, this is my first time posting here and I would appreciate detailed guidance in your comments. Just a little background about myself: I am a second-year college student with one year of Python training. I only recently started learning ...

Aligning a Facebook share button to the center of a webpage

On my webpage, I have the following section: <div style="align:center"> <div id="fb-root"></div> <script src="http://connect.facebook.net/en_US/all.js#appId=217585988283772&amp;xfbml=1"></script> <fb:like hre ...