Background images

User 1964159 Photo


Registered User
156 posts

Hi everyone,
background images have got me "flummoxed"
The site is NOT live, here is the HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Cover Page - THE QUEEN'S ENGLISH SOCIETY</title>
<meta http-equiv="generator" content="CoffeeCup HTML Editor (www.coffeecup.com)" />
<meta name="created" content="Mon, 26 Oct 2009 10:18:39 GMT" />
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<link href="style1.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
<div id="content">
<div id="coverpage">
<img class="coverheading" src="Images/coverheading.png" width="679" height="93" alt="" title="" border="0" align="" />
</div> <!-- end coverpage div -->
</div> <!-- end content div -->
</div> <!-- end wrapper div -->
</body>
</html>
This is the CSS (the page has its own external style sheet):
body {
margin: 0;
padding: 0;
background-color: #000000;
font: small Helvetica, arial, sans-serif;
}
#wrapper {
width: 1100px;
height: 750px;
background-color: #330033;
margin-left: auto;
margin-right: auto;
margin-top:20px;
padding-bottom: 5px;
}
#content {
background-image: url(coverpage.png);
}
.coverheading {
float: right;
}
on viewing in a browser, I can see the "wrapper" and my png image of a heading, (subject to padding etc.) but no sign of my background image, which is in my working folder - Projects/My Sites/Images.......Any idea anyone, as always it would be helpful
User 122279 Photo


Senior Advisor
14,648 posts
Online Now

Maybe:

background-image: url(Images/coverpage.png); ?
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 1964159 Photo


Registered User
156 posts

Sorry Inger, that didn't work. Clearly, I cannot add the image details to the HTML as it would not show as a background, but nice try!
User 148353 Photo


Ambassador
808 posts


background-image:url(Images/coverpage.png);

needs to be added to the body section of the css, not the content
"Time heals everything. Know who said that? My Latin teacher at barber college!"
- Floyd Lawson

Widoktadwat - "Plays Well With Others"

User 1964159 Photo


Registered User
156 posts

Thank you Lowell,
I have got a fixed width wrapper inside the body, but popped it in there and it works perfectly, You are a star and I'm ver grateful for the assistance.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.