Background for a webpage

G

Guest

I'm trying to add a background to a webpage I am currently creating, however,
it keeps tiling the image in the background. Does anyone know how I can get
the image in the background only once, instead of having it tiled repeatedly?
Thanks!
 
G

Guest

Thanks Steve, however the background is still tiling when the code is put in.
Any other suggestions?
 
D

David Berry

If this is a background image you need to add the location of the image to
the CSS that Steve gave you. For example, switch to Code View and above the
</head> tag put:

<style type = "text/css">
body{
background-image:
url(images/myimage.jpg);
background-repeat: no-repeat;
}
</style>

If you wanted to center it you could add:

background-position : 50% 50%; so it would look like this:

<style type = "text/css">
body{
background-image:
url(images/myimage.jpg);
background-repeat: no-repeat;
background-position : 50% 50%;
}
</style>

You can play with the percentages to move it to where you want it on the
page.

If you want your text to scroll over it you could add:

background-attachment : fixed;

So it would then look like this:

<style type = "text/css">
body{
background-image:
url(images/myimage.jpg);
background-repeat: no-repeat;
background-position : 50% 50%;
background-attachment : fixed;
}
</style>

You'd just keep adding to the CSS style until you get what you're looking
for. You can do a search for CSS or stylesheets for more about them or take
a look at

http://msdn2.microsoft.com/en-us/library/aa140116(office.10).aspx for some
basic info.
 
T

Trevor L.

Jennifer said:
Thanks Steve, however the background is still tiling when the code is
put in. Any other suggestions?

I cannot see how Steve's suggestion would not work.

Can you post the URL which is having the problem
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
----------------------------------------
 
D

David Berry

I think she wants to use an image and needs to add:

url(images/myimage.jpg);

to what Steve posted


Trevor L. said:
Jennifer said:
Thanks Steve, however the background is still tiling when the code is
put in. Any other suggestions?

I cannot see how Steve's suggestion would not work.

Can you post the URL which is having the problem
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
----------------------------------------
 
T

Trevor L.

David said:
I think she wants to use an image and needs to add:

url(images/myimage.jpg);

to what Steve posted

OK, this makes more sense (together with your later post)
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
----------------------------------------
 
M

Murray

OP says -

"Thanks Steve, however the background is still tiling when the code is put
in.
Any other suggestions?"

My guess is that she has put the CSS in the wrong place. We'd need to see
her code to know for sure.


--
Murray
--------------
MVP FrontPage


David Berry said:
I think she wants to use an image and needs to add:

url(images/myimage.jpg);

to what Steve posted


Trevor L. said:
Jennifer said:
Thanks Steve, however the background is still tiling when the code is
put in. Any other suggestions?

I cannot see how Steve's suggestion would not work.

Can you post the URL which is having the problem
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
----------------------------------------
 
G

Guest

Sorry for my delayed rsponse, so this worked however one last question, how
to I stretch it so that it fits the entire page? thanks!
 
D

David Berry

You need to create a bigger graphic. You could change the width in
FrontPage but then it will look fuzzy and distorted.
 

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