/    Sign up×
Community /Pin to ProfileBookmark

CSS Help Needed

>

I have my image “laptop.jpg” in the image folder but my image doesn’t show up. When I check my CSS code on CSS validator, it finds some errors, but it doesn’t give me an instruction on how it fix the errors.
`background: url(image/laptop.jpg) left top no-repeat /300px, url(image/laptop.jpg)
right bottom no-repeat /300px;`

>

The above codes should display two images on my HTML page, but there seems to be some errors that I don’t know

>

Neither this code works…
> `background: green url(image/laptop.jpg) no-repeat center fixed /cover;`

to post a comment
CSS

8 Comments(s)

Copy linkTweet thisAlerts:
@rachel14Jan 06.2020 — Hi ,

I can surely help you as I am having experienced in same domain.

reach me at rachel at cisinlabs dot com

Rachel
Copy linkTweet thisAlerts:
@mizocoderauthorJan 06.2020 — @rachel14#1612533

If you really know the errors with my codes and a way to fix the errors, why didn't you share that knowledge here? I believe there are many other contributors who are well versed in CSS with willingness to contribute their knowledge and skills to assist others on this helpful and informative forum.
Copy linkTweet thisAlerts:
@SempervivumJan 06.2020 — Is your CSS located in an external file and is that file located in a subdirectory?
Copy linkTweet thisAlerts:
@mizocoderauthorJan 06.2020 — > In my main folder I have html file and an image folder inside that main folder, in that image folder I have laptop.jpg.

<html>
<head>
<title>Background-Part 1</title>
<style>
div{
width: 400px;
height: 400px;;
border: 100px double red;
color: #fff;
margin: 50px auto;
padding: 20px;
<br/>
<i> </i> background: url(image/laptop.jpg) left top no-repeat /300px, url(image/laptop.jpg)
<i> </i> right bottom no-repeat /300px;

<i> </i> background: green url(image/laptop.jpg) no-repeat center fixed /cover;
<i> </i>
<i> </i>
<i> </i> }
<i> </i> &lt;/style&gt;
<i> </i>&lt;/head&gt;
<i> </i>&lt;body&gt;
<i> </i> &lt;div&gt;
<i> </i> &lt;h1&gt;Hello World&lt;/h1&gt;
<i> </i> &lt;/div&gt;
<i> </i>&lt;/body&gt;
&lt;/html&gt;
Copy linkTweet thisAlerts:
@SempervivumJan 06.2020 — May be a spelling issue?

The web server is case sensitive, i. e. laptop.jpg is not the same as laptop.JPG

Does the name of the image folder really read `image</C> not <C>images</C>?<br/>
Does your original code contain a linebreak in the background rule too?

Open the networks tab in your developer tools and find your filename. Is there any hint?

BTW: You better use code tags instead of backticks in order to format code: <C>
your code here`


I edited your posting accordingly.
Copy linkTweet thisAlerts:
@mizocoderauthorJan 07.2020 — > I checked everything and it seems to be fine; I opened my developer tool and didn't see any hint. I think the browser doesn't like the front slash for some reason. It says, "invalid property value".

Without the front slash, removing the front slash, the browser displays the image with no errors.

background: green url("image/laptop.jpg") no-repeat center;
Copy linkTweet thisAlerts:
@sathwikboddu55Jan 07.2020 — [uptodown](https://apkmist.com/uptodown-apk)

[uptodown app](https://apkmist.com/uptodown-apk)

[uptodown apk](https://apkmist.com/uptodown-apk)

[uptodown downoad](https://apkmist.com/uptodown-apk)

[uptodown for android](https://apkmist.com/uptodown-apk)

if you want apk directly to your android click the links.
Copy linkTweet thisAlerts:
@mizocoderauthorJan 10.2020 — Thanks for trying to help. I really appreciate your time. Now, I know the reason why my code doesn't work. This code works!
background: url("images/laptop.JPG") no-repeat left top /300px, url("images/laptop.JPG") no-repeat right bottom /300px;
×

Success!

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