473,379 Members | 1,174 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

"background-image" code not working

Here's the code:
Html:
<!DOCTYPE html>
<html lang="en">
<head>
<title>title</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="Style_01.css">
</head>

<body>
<header>
header
</header>
<nav>
nav
</nav>
<main>
main
</main>
<footer>
footer
</footer>

</body>
</html>
CSS:
body{
background-image: url("Images\back_01.jpg");
}

All files should be correctly named. I've been at this for hours and I can't figure it out. Help!

Btw, I know that the CSS does work. If I do "background-color" it works with what I define. But for some reason the code for "background-image" (or shorthand background with image url after) doesn't work.
Oct 22 '17 #1
1 36084
tdrsam
97 64KB
I'm just guessing at this but I suspect your image (the actual file) can't be found by your code.

Have you tried using dev tools to see if the url of your image is correct? If not, go to the browser your using to view the webpage your making, and right-click. In Chrome you choose 'Inspect', in Firefox you choose 'Inspect Element'. It's different for all browsers, just google to find out what it is for your browser, if it's not one of those.

In Firefox, when you hover your mouse over the background-image code, the image displays. If the code isn't correct it will tell you that the image can't be found. If that happens, it means you haven't quite gotten the url code right. The name of the folder has to be correct as well as the name of the file. The folder has to be in the right location as well.

If that's not even close, just let me know and we could try something else.
May 8 '18 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: menakasrinivasagam | last post by:
my coding is working in mozilla firefox.but not working in Internet explorer.plz give suggestion to rectify this problem
5
by: athirai | last post by:
Hi all, I want to scroll within a window. <a href="javascript:window.location('#first');">First</a> When i click First then it moves to the particular anchor tag within the same page. <a...
10
by: Mike | last post by:
I have code that is doing some updating to a record. Its getting the ID to update from the Grid. I'm passing an INT to my method to update the record. My code is working though I'm still getting an...
26
by: Jenitha S | last post by:
Hi, I am working in JSP code.A Menubar is displayed in JSP page.It's working fine in IE. But in case of firefox the very first menuitem is not working.If i move that menu item as second means it's...
1
by: suneel271 | last post by:
code working in internet explorer but not in mozilla and iam getting erroe like window.event has no properties and here is the code <%@ page language="java" contentType="text/html;...
3
by: kepskp | last post by:
i just write code for select option in combo box which i m select but when i press search button and then click on back button then there in no option selected. and that same code working in ie7 and...
6
by: DruidFluid | last post by:
Hello, I’m using Paul Irish’s “bulletproof” @font-face code and a premade font kit from fontsquirrel.com on my tumblr template. The @font-face code seems to work fine in Chrome but not in Safari or...
0
by: Mangalasamy | last post by:
i attached ftp connction code, its worked in local server ,but not work in particular website server, ex; working in http://server:81/video; not working in...
8
by: suchait | last post by:
my login php script is working on my localhost(OS:ubuntu) but when i put it online its not working. php code for login script: <?php include('config.php'); //including configuration file...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.