One CSS-entry ignored

Hi,
the newbie again.
I don’t like things that worked and then suddenly not. But happened and after long seeking I gave up:
I have in CSS-file:

body {
  background-color: DarkKhaki 
    text-align: center
}

All the other definitions are working, so the CSS-file is included ok.
In the HTML I have

<body>

with nothing else, and I thought it should be suficient. I also tried to make a class, but that did not work either. I also tried to take away any CSS-definition, and put the style directly in the body tag. It worked for the background, but not for center. Later I will not center everything, but right now I need it.
But the most irritating is, that the body entry in the CSS-file is ignored, whilst the others are ok.
I am far from developing what I want, I have the ideas but the fact is - hard way.
Any help? Please

the coloring of the forum’s syntax highlighter should give you a red flag as to what’s gone wrong… (hint: what goes at the end of your background color line that you forgot?)

1 Like

Hi there webdesign23,

you could try this…

body {
    background-color: #bdb76b;
    text-align: center;
 }

Notice also that semi-colons have been
employed after each of the attributes. :winky:

coothead

You are my heroes!
I idiot forgot ; in the body CSS.
Thank you very much for the hint.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.