Jump to content

Noob needs some advice


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 post
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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...