Jump to content

Noob needs some advice


promethius

Recommended Posts

Im having problems with a sample Im working on. Here is the code*<?xml version="1.0" encoding="iso-8859-1"?>*<!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">*<head>*<style type="text/css">*body {background-image: url("images\clubhouse.jpg")}*</style>* <meta http-equiv="content-type"* content="application/xhtml+xml; charset=iso-8859-1" />* <title>Liverpool Sailing Club - Your watersports Center</title>* <meta name="generator" content="amaya 9.4, see http://www.w3.org/Amaya/" />*</head>*<body>*</body>*</html>Without the asterisks of coursewhat I should think happen is that the jpeg should display or have I totally messed up. The authoring tool Im using is Amaya for mac. Im thinking that the location of the style should probably be moved ?Thanks

Link to comment
Share on other sites

The reference for the background is a URL. Therefore, it should be written with forward slashes instead of backslashes. Try it like this:

body {background-image: url("images/clubhouse.jpg")}

If it doesn't work, try to move the image in the same folder as the CSS and the HTML and remove the "images/" of course. If it still doesn't work, then... well... I have no idea.

Link to comment
Share on other sites

OMG I made a dreadful mistake typed \ instead of / for the file url.Doh Doh !It's a new machine MacMini and the keyboard is a bit strange !

Im having problems with a sample Im working on. Here is the code*<?xml version="1.0" encoding="iso-8859-1"?>*<!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">*<head>*<style type="text/css">*body {background-image: url("images\clubhouse.jpg")}*</style>*  <meta http-equiv="content-type"*  content="application/xhtml+xml; charset=iso-8859-1" />* <title>Liverpool Sailing Club - Your watersports Center</title>*  <meta name="generator" content="amaya 9.4, see http://www.w3.org/Amaya/" />*</head>*<body>*</body>*</html>Without the asterisks of coursewhat I should think happen is that the jpeg should display or have I totally messed up. The authoring tool Im using is Amaya for mac. Im thinking that the location of the style should probably be moved ?Thanks

Link to comment
Share on other sites

Are you saying the image doesn't display as the background?Try it in IE and FFWhile in Amaya, press the refresh button. I'm not using the most recent version of Amaya, but I have noticed a few things. Press refresh after you make changes to the source - changes should show automatically, but some may not. Also, Amaya doesn't seem to like images that are a large file size. That might be changed in newer versions though... but try testing with an image file that is small just to see...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...