problem with repeating css graphic


M

Mark

body{background-image:url('images/bggreen.jpg');}


This is created in a css page and is linked to a page. It displays it in
the page I want it to. The problem is I do not want to image to repeat.

The code below works on a single page. The problem seems to be trying to
get the image not to repeat and get the color to continue on the page on the
css page that I am linking it to. The image displays but it repeats. It
seems like I am missing some type of configuration. Any help would be
appreciated.

<style type="text/css">
body {background: #EFEFEF url(images/bggreen.jpg) repeat-x;}
</style>
 
Ad

Advertisements

J

Jon Spivey

Hi Mark,
There's 4 options for repeat
repeat-x - repeats across the page (but not down)
repeat-y - repeats down the page (but not across)
repeat - tiles to fill the page
no-repeat - shows the image once.

Sounds like you should be using no-repeat rather than repeat-x. This will
show the image once in the top left - if you want it somewhere else you can
set it's position.

Cheers,
Jon
 
M

Mark

I've tried all four and was not successful with any of these. It works if I
put it on the same page but when I put the information below in my css page
and then link it I get the graphic but it repeats. Below is what I put in.
I substituted repeat-x for any of the other three. the graphic starts out
green and then fades to a light gray so I want the light gray to continue
for the duration of the page


body{background-image:url('images/bggreen.jpg');} repeat-x;)

or repeat -
 
Ad

Advertisements

M

Mark

disregard it. I think I finally got it to work.

Mark said:
I've tried all four and was not successful with any of these. It works if
I put it on the same page but when I put the information below in my css
page and then link it I get the graphic but it repeats. Below is what I
put in. I substituted repeat-x for any of the other three. the graphic
starts out green and then fades to a light gray so I want the light gray
to continue for the duration of the page


body{background-image:url('images/bggreen.jpg');} repeat-x;)

or repeat -
 

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