Jump to content

What am I doing wrong?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
divaliya

divaliya

    Newbie

  • Members
  • Pip
  • 8 posts
This is what I have & I don't know what I'm missing or doing wrong to get this program to work correctly? Can't get the image to load...

<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<title>Image</title>
<style type = "text/css">
body { background-image: url(logo-snappy.gif);
background-position: center;
background-repeat: repeat-x;
background-attachment: fixed;
background-color: #800080 }
</style>
</head>


<body>
<p>
Just a sample of what a CSS text and background image should look like.</p>
</body>
</html>

#2
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
image url must be with single quotes
background-image: url('logo-snappy.gif');


#3
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
you have the answer , the file name of the image must be encapsulated with a ' quotes
<html xmlns = "http://www.w3.org/1999/xhtml">
	<head>
	  <title>Image</title>
          <style type = "text/css">
		body  { background-image: url('logo-snappy.gif');
		        background-position: center;
		        background-repeat: repeat-x;
		        background-attachment: fixed;
		        background-color: #800080 }
	  </style>	
	</head>
	<body>
	  <p>
	  Just a sample of what a CSS text and background image should look like.</p>
	</body>
</html>


#4
divaliya

divaliya

    Newbie

  • Members
  • Pip
  • 8 posts
Thanks! Now if I can just figure out why my image won't appear I'm all set. :lol: