so I literally just copied and pasted this code from another directory of my site, css and all, and the BG image is not showing. It just shows as white. I made sure to recreate the images folder in the new directory and reupload the background, but the background just doesnt show. Here is my CSS (with the bg image)
html,body {
background: url(images/bg_body.png) ;
font-family:Capriola;
height:100%;
margin:0;
padding:0;
}
Here is my html:
<html>
<style>
html,body {
background: url(images/bg_body.png) ;
font-family:Capriola;
height:100%;
margin:0;
padding:0;
}
</style>
<head>
<LINK REL=StyleSheet HREF="images/styles.css" TYPE="text/css" MEDIA=screen>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
<title>SeaJay Source</title>
</head>
<body>
<body>
<center><br><br><br><br><br><br><br><br><br><br>
<img src="assets/logo.png" />
<div id="posting" class="posting">
<div class="title" id="title" color="white">Login</div>
<div id="texts" class="texts">
Welcome to SeaJay Source!<br>
<form method="post" action="<?=$_SERVER['PHP_SELF']?>" >
Username: <input class="input" type="text" name="username" placeholder="Username" /><br>
Password: <input class="input" type="password" name="password" placeholder="Password" /><br>
<input class="button" type="submit" value="Login" /> <br>
</form>
</div>
</center>
</body>
</html>
As you can see, I tried to include the styling inside the html file also, but that didn’t work.
That’s your problem, almost certainly.
Always specify URLs relative to the root of your domain. It should look like
url('/path/to/image.png')URLs in CSS can be confusing, since some thing use the HTML file’s location as a base, and others use the CSS file’s location. It’s just easier all around to specify your URLs relative to a fixed base: the root.