Background images

Home » Forums » Website Design and Development » Background images


Registered User
117 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
tonethemoan
I luv the web
http://www.queens-english-society.com
http://www.thethatcherstavern.com
http://www.philchambersconsultancy.co.uk


Senior Advisor
6,673 posts

Maybe:

background-image: url(Images/coverpage.png); ? Ha en riktig god dag!
Inger, Norway
http://www.eikweb.com
http://www.horgenhonning.net/
http://www.norwayroots.com
http://www.johnsflats.com


Registered User
117 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! tonethemoan
I luv the web
http://www.queens-english-society.com
http://www.thethatcherstavern.com
http://www.philchambersconsultancy.co.uk


Ambassador
789 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"


Registered User
117 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. tonethemoan
I luv the web
http://www.queens-english-society.com
http://www.thethatcherstavern.com
http://www.philchambersconsultancy.co.uk

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.