Cascading Background

J

Jcraig713

Hello. Can someone tell me why when I place a picture in the background it
cascades? I tried to "chop the picture" and place each piece in a table and
the picutures cascade within the tabel cell too. What can I do to get this
to stop cascading?
 
R

Ronx

A background image will always tile to fill the container it is in -
whether this is a table cell, or the <body> of the page.
You can use CSS to prevent the tiling, but the image will not stretch to
fill the container.

For example:

<html>
<head>
<title>...</title>
<!-- other meta tags -->
<style type="text/css">
body {
background-image: url(images/back.jpg);
background-repeat: no-repeat;
background-position: center center;
}
</style>
</head>
<body>
<p>This page will have images/back.jpg centred on the page as a
background</p>
</body>
</html>
 
J

Jcraig713

I put the background picture in my web, and altered the code as you suggested
(below):

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>

<style type="text/css">
body {
background-image: url('website_reference.png');
background-repeat: no-repeat;
background-position: center;
}
</style>
</head>

<body background="images/website_reference.png">

</body>
</html>

And the picture disappeared from my view? Do I need to create a .css page
as well? Can you provide direction?
 
R

Ronx

That's not quite as I described
Try this:

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>

<style type="text/css">
body {
background-image: url('images/website_reference.png');
background-repeat: no-repeat;
background-position: center;
}
</style>
</head>

<body>

</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top