Hot Summer Deals are Here!
Celebrate with up to 99% off on 17,100 resources
03
Days
12
Hours
21
Mins
03
Secs

Help with 1 line of code!

Status
This thread has been locked.

Furex

EnderSetups & Manager of Kirbs!
Premium
Feedback score
0
Posts
1,047
Reactions
269
Resources
0
Hello,
So I have a background uploaded on to my website but I need help with some CSS. I want the background just go it covers the top part of the page instead of the whole page, if anyone knows how to do this either PM me or just add a reply on this thread.
Thank you.

Kind regards,
Josh.
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Chearful

thomas.gg
Supreme
Feedback score
115
Posts
1,398
Reactions
2,236
Resources
0
background-type: cover;
 

Furex

EnderSetups & Manager of Kirbs!
Premium
Feedback score
0
Posts
1,047
Reactions
269
Resources
0

Chearful

thomas.gg
Supreme
Feedback score
115
Posts
1,398
Reactions
2,236
Resources
0

Furex

EnderSetups & Manager of Kirbs!
Premium
Feedback score
0
Posts
1,047
Reactions
269
Resources
0

Chearful

thomas.gg
Supreme
Feedback score
115
Posts
1,398
Reactions
2,236
Resources
0
Could you help? I have created a div, please add me on Skype:
Joshuahumpage0101.
on holiday atm pm me your code and i'll look
 

Furex

EnderSetups & Manager of Kirbs!
Premium
Feedback score
0
Posts
1,047
Reactions
269
Resources
0

dentmaged

Premium
Feedback score
2
Posts
110
Reactions
38
Resources
0
What you could do is create an img of the background, and position it behind the other elements using a negative z-index and use top and left to position it on the z and y axis. Make sure you have position: absolute, otherwise z-index won't work.
 

Wvisoecj

Supreme
Feedback score
9
Posts
471
Reactions
677
Resources
0
What you could do is create an img of the background, and position it behind the other elements using a negative z-index and use top and left to position it on the z and y axis. Make sure you have position: absolute, otherwise z-index won't work.
No that's bad.

Use this snippet for background-image

html {
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
 

dentmaged

Premium
Feedback score
2
Posts
110
Reactions
38
Resources
0
No that's bad.

Use this snippet for background-image

html {
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
I know, but I tried to use background-position-y, and it failed for his code so I suggested that. I always use background.
 
Status
This thread has been locked.
Top