/    Sign up×
Community /Pin to ProfileBookmark

How to stop background images from repeting

hello, i’m having a hard time here trying to stop my image from repeting it self over & over on my page, what i want is the image right smack on the center, without repeting it but as a background.

when i use <TD Background=”image.gif”> all it does is repete itself =( anyhelp would be great.

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@vickers_bitsJun 27.2003 — use css (css1...nn4+ ie4+)

background-image:url(image.gif);

[B]background-repeat:no-repeat;[/B]
Copy linkTweet thisAlerts:
@DaveSWJun 27.2003 — and

background-position:center;

and by the way you use that like this: (just in case you've not used css)

<td style="background-image: url("pic.jpg"); background-repeat: no-repeat; background-position:center;">
Copy linkTweet thisAlerts:
@arckanumauthorJun 27.2003 — hey thanks for the fast reply, i don't know much about css So i tried what Dave sugguested

<td style="background-image: url("images/test.gif"); background-repeat: no-repeat; background-position:center;">

and now the image won't even show up :x any ideas anyone?
Copy linkTweet thisAlerts:
@hastxJun 27.2003 — try single quotes:

url('images/test.gif')

and this may go without saying, but, make sure to close the</td> tag and make sure the cell actually has something in it.
Copy linkTweet thisAlerts:
@CharlesJun 27.2003 — [i]Originally posted by hastx [/i]

[B]try single quotes[/B][/QUOTE]
[font=georgia]Or no quotes at all. But with inline styles don't use double quotes if you are using double quotes with the HTML and don't use single quotes if you are using single quotes with the HTML.[/font][i]From the CSS2 Specification:[/i]

[b]The format of a URI value is 'url(' followed by optional whitespace followed by an optional single quote (') or double quote (") character followed by the URI itself, followed by an optional single quote (') or double quote (") character followed by optional whitespace followed by ')'. The two quote characters must be the same.[/b]

[i]http://www.w3.org/TR/REC-CSS2/syndata.html#uri[/i][/quote]
×

Success!

Help @arckanum spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...