[HELP] CSS Dosen't work at HTML

Status
Not open for further replies.

Shado

Member
Oct 7, 2013
146
17
Hello Devbest,

Im working on my template but I found the background dosen't work, Can someone help me
HTML:
HTML:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
</html>

CSS:
Code:
Background {
background: url(img/bg.jpg) no-repeat center center fixed;
}

Thanks.
 

Savallusion

#swipeproject
Jul 16, 2010
990
220
Not sure if "Background" attribute is supposed to be the complete background, but I'll assume so.
Go with "body, html" instead of "Background", and you've put "center" twice. "center center fixed"
body, html {
background: url('i../mg/bg.jpg') no-repeat center fixed;
}
I would also use "../" for images that aren't located within the css/ folder, as that's what yours is set for atm. the "../" goes up a folder, which makes it possible to fetch stuff for the CSS from other folders.
 
Status
Not open for further replies.

Users who are viewing this thread

Top