/    Sign up×
Community /Pin to ProfileBookmark

background-image: url

Hi

I’m having a hard time getting this to work.

The file is located in a folder called images and the file name of the file is header_02.gif

background-image: url(“/images/header_02.gif”);

am I missing something to make this work

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@CFHuttonMar 26.2006 — You don't need that slash before images I don't think. You can also assign it to just the background property.

background: url("images/picture.jpg");

CFH
Copy linkTweet thisAlerts:
@WebJoelMar 26.2006 — You don't need to use the quotes in the parenthesis either, so this should work:

background-image: url(images/header_02.gif);

I just find it easier to not 'quote' the image's url path when it is already enclosed in a ()
Copy linkTweet thisAlerts:
@ray326Mar 27.2006 — Is the web site based at the root of the host? I.e. it's not in a subdir. Can you retrieve that image with www.myname.com/images/picture.jpg?
×

Success!

Help @kproc 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.17,
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,
)...