Hot Summer Deals are Here!
Celebrate with up to 99% off on 17,600 resources
02
Days
03
Hours
16
Mins
41
Secs

I need help embedding a photo [HTML]

Status
This thread has been locked.

Thanh

Chief Executive at Interbix Holdings
Premium
Feedback score
2
Posts
195
Reactions
57
Resources
0
My friend gave the domain squidward.us and I want to add this photo of squidward (http://cdn.pcwallart.com/images/squidward-wallpaper-1.jpg) onto the page. I have some HTML done but I want to have the background to be #c9e5d7 since the picture doesn't fit the entirety of the screen (Depending on what resolution you have it may fit). I want this picture to centered which means that it shouldn't be repeated. Also, instead of having white as the background, I have to have it be #c9e5d7 (Which is what I am having issues with). Here's my current HTML:

<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: #c9e5d7 url("http://cdn.pcwallart.com/images/squidward-wallpaper-1.jpg");
background-repeat: no-repeat;
background-position: center;
background-attachment: fixed;
}
</style>
</head>
<body>

<h1>Hello World!</h1>
<p>Now the background image is only shown once, and it is also positioned away from the text.</p>
<p>In this example we have also added a margin on the right side, so that the background image will not disturb the text.</p>

</body>
</html>
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Wvisoecj

Supreme
Feedback score
9
Posts
471
Reactions
677
Resources
0
HTML:
html {
  background: url(http://cdn.pcwallart.com/images/squidward-wallpaper-1.jpg) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
 

Thanh

Chief Executive at Interbix Holdings
Premium
Feedback score
2
Posts
195
Reactions
57
Resources
0
HTML:
html {
  background: url(http://cdn.pcwallart.com/images/squidward-wallpaper-1.jpg) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
Since the picture doesn't fit the entirety of the screen, is it possble for me to use '#c9e5d7' for the rest of the website?
 

Airee

she/her - Airee Systems
Supreme
Feedback score
13
Posts
351
Reactions
207
Resources
0
Since the picture doesn't fit the entirety of the screen, is it possble for me to use '#c9e5d7' for the rest of the website?
Yeah.

HTML:
background-color: #c9e5d7;
 
Status
This thread has been locked.
Top