/    Sign up×
Community /Pin to ProfileBookmark

div style background:url issue

I’m trying to follow along in this course I’m taking but when I changed my `img` tag to `div style= “background:url(/IMAGES/images.jpeg)” </div>` the inspector gives me an invalid property value icon in the element.style. How can I fix this?

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@TheBraveauthorMay 21.2020 — @TheBrave#1618677 My mentor has it typed in the inspector element.style as background: url(dog.jpg) ; with no issues. So i typed my own website out as background: url(images.jpeg); yet my property value is invalid!
Copy linkTweet thisAlerts:
@NachfolgerMay 21.2020 — @TheBrave#1618678

Does the file exist?
Copy linkTweet thisAlerts:
@bwclovisMay 21.2020 — Is the file a '.jpeg'...... or a '.jpg' ?
Copy linkTweet thisAlerts:
@siddhi_patelMay 25.2020 — hello..

i created a simple page with no other items just basic tags and no seperate css file and got an image

``<i>
</i>&lt;div id="placeholder"
style="width: 60px; height: 60px; border: 1px solid black; background-image:url('http://www.mypicx.com/uploadimg/1312875436_05012011_2.png')"&gt;
&lt;/div&gt;<i>
</i>
``

i put an id just incase there was a hiddne id tag and it works
×

Success!

Help @TheBrave 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 4.24,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...