My CSS Background Has Disappeared (It Was Showing Up Before)

Having trouble getting my CSS background to display in Dreamweaver. Previously, I had a picture set as the background of my website but now it won't change and only shows up as black – which is the background color.

Below is a snippet of the background code

.website {
background-position: 0%
%;
background-attachment: fixed;
max-width: 100%;
width: 100%;
background-image: url(../images/craig_sarah_57.jpg);
background-color: #000000;
}

Despite the code above, the background still displays as black.

Answer №1

There seems to be an error in your CSS code. Take a closer look at the background-position line, as there appears to be two % symbols mistakenly included.

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 there a CSS selector that allows me to exclude the final two child elements?

Is there a way to apply bottom-border to certain div elements within their parent, excluding the last two? It's important to note that the number of child elements can vary: <div id="parent"> <div> One </div> <div> Tw ...

What is the process for creating an animation with a filter or toggle effect?

I am eager to create an interactive animation for my search engine on my website, but I'm struggling with where to begin. Here is the relevant HTML snippet: <div id="companyRoster" class="companyRoster container"> <div class="row mb-2"& ...

"The functionality of the express post method does not seem to be working properly when accessing

I am having trouble retrieving form data sent using the "POST" method from an HTML form in my app.post method. I am unable to access anything from req.body. Can anyone point out what mistake I might be making? Here is my HTML form - <form method=" ...

What considerations should I keep in mind when changing the DOCTYPE from html 4.01 transitional to 'html'?

Firefox is telling me that my pages are being rendered in 'standards compliance mode' based on the doctype... <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> After changing it to < ...

Design adaptable HTML backgrounds

Hello, I am working on a webpage that uses two background images. Here is the CSS I'm using: body{ background: url('<?=base_url();?>/assets/header_bg.png') no-repeat, url('& ...

Obtain text contained within a <span> tag using Python Selenium

Is there a way to retrieve the text "-3" from a span using selenium? https://i.sstatic.net/1yGeK.png ...

Notify user with a Javascript alert if there are no search results found

I have developed a search index for Chicago employees and want to create an alert if no matching records are found. However, I am struggling to determine the value that needs to be inserted in case of an empty result set. Ideally, upon submission of the fu ...

What is the process for creating a duplicate element within the target div after the original element has been dropped?

Imagine a scenario where the "HI" div is dragged into the "DRAG HERE" div, causing the "HI" div to be removed from its original location. What if, instead of disappearing, dragging the "HI" div to another location generated a new "HI" div? /** * Fu ...

Streamlining Your Ajax Script: A Guide to Eliminating Redundant Code

I am looking to streamline the following script and create a reusable function for it. Currently, I am using it with: <span id="test"></span> <span id="abc"></span> <span id="123"></span> Currently, the script looks li ...

What is the method for dynamically assigning a CSS class to an ASP.NET control through programming?

I was curious about how I could dynamically apply a CSS class to an ASP.NET Control (specifically a TextBox) through C# on the backend. For instance: <asp:TextBox ID="firstName" CssClass="input left" runat="server" Text="First Name" /> I want to ad ...

Creating responsive images with Bootstrap 5

1 I am currently using Bootstrap 5 to develop a website and encountering an issue with getting images to move above text in the feature and mission sections on mobile or tablet screens. Previously, I was able to achieve this effect using the following cod ...

Tips for directing attention to a specific row with an input field in JavaScript

I duplicated a table and added an input field for users to search or focus on a specific row. However, there are two issues: When a user enters a row number, the table displays the wrong row - for example, if the user enters 15, the table shows row number ...

CSS opacity is currently not working as intended

Why doesn't the opacity work here? I've tried using hex and rgba colors, but nothing changes. Even adding classes to tr and td didn't help... First attempt: .done{ background-color: rgba(0,175,51,5); color:white; opacity: 50; ...

Interacting with PHP through JavaScript function calls

I am facing some frustration with my website due to an issue involving PHP. When I retrieve data from a PHP file, it returns a JSON list like this: {"Data":{"Recipes":{"Recipe_5":{"ID":"5","TITLE":"Spaghetti Bolognese"},"Recipe_7":{"ID":"7","TITLE":"Wurst ...

Removing a dropdown list from a series of dropdown lists using JavaScript

I found this code on a coding website and decided to customize it. The original code allowed users to add and delete text areas from a list, but I wanted to try the same concept with dropdown lists. Unfortunately, my modified version is not working as inte ...

Using HTML and JavaScript to compare the content of a text file and update it only if the value has been

Currently, I have implemented a small JavaScript script to update text on a website by fetching the content from a text file stored on the server. The code itself works as expected, but I am looking for a way to determine if the contents of the file have c ...

What is the distinction between using localStorage and storing individual files when clicking?

Recently, I created a basic jQuery script that stores values such as "voted1", "voted2", and "voted3" in localStorage. However, I encountered an issue where all values are stored simultaneously on click, whereas I require them to be stored individually per ...

Utilize a Dropdown Menu to Retrieve Information from a Database and Display the Results on Either the Current Page or a Separate Page

My PHP page includes a code snippet that generates an HTML table: <table> <thead> <tr> <th class="wheniwant">Date</th> <th class="wheniwant">Income Amount</th> <t ...

What is the best way to reset the animationTransform using JavaScript?

Incorporating SMIL animations in Firefox is presenting a challenge for me. The animation starts automatically upon page load, but I need to find a way to trigger it dynamically through JavaScript. I suspect that the issue may lie with the begin attribute. ...

Trigger a function upon the addition of a class to a div element | Execute AnimatedNumber()

Is there a way to trigger a function when a specific div receives a certain class? I have an animated div that only appears when scrolling, and once it's visible, it gains the class "in-view". I want to execute a function every time this div has the ...