langel
langel

Reputation: 99

My <body> isn't accepting background color/image

CSS code

body { 
    background-attachment: scroll;
    background-clip: border-box;
    background-color: #ececec;
    background-image: none;
    background-origin: padding-box;

}

Link: http://grupocoral.netai.net/

No matter what I do I can't change background properties.

Upvotes: 0

Views: 242

Answers (5)

Sven Bieder
Sven Bieder

Reputation: 5681

Because your stylesheet has html style-tags in it.

remove <style type="text/css"> from the top and </style> from the bottom

Upvotes: 1

Brian
Brian

Reputation: 3958

In your CSS document style.css the opening lines are the following:

/* CSS Document */
<style type="text/css">
body {

You need to delete <style type="text/css"> from style.css because that is only used when writing styles inside the <style> tag in an HTML document. Also delete </style> at the foot of the document. Your style.css document is a CSS document, not an HTML document.

Upvotes: 2

Starx
Starx

Reputation: 78971

You have placed your CSS code in the style sheet along with the <style> tags. You shouldn't do that when attaching an external CSS stylesheet. You can directly define the styles.

Remove

<style type="text/css"> & </style> from your file style.css

Upvotes: 3

Engineer
Engineer

Reputation: 48793

Remove <style type="text/css"> and </style> from your css file.

Upvotes: 6

Andy Evans
Andy Evans

Reputation: 7176

background:#ececec url('/path/image');

also see this link

Upvotes: -2

Related Questions