0

Footer css after form's css is not working , what is the problem in this css code?

/*------------------------------------*\
    FORMS */

fieldset { padding: 10px; border: 1px solid #ccc; margin-bottom: 1.5em; }
label { display: block; cursor: pointer; }
    label:after { content:\": "; }
    label::after { content:\": "; }
input,textarea { font-family: inherit; font-size: 1em; line-height: 1.5; }
[placeholder] { cursor: pointer; }
    [placeholder]:active,[placeholder]:focus { cursor: text; }
fieldset > :last-child { margin: 0; }


footer {background:red; height:200px; width:200px}

jSfiddle http://jsfiddle.net/Aw239/

in jsfiddle example footer should be red background.

4
  • It is red when I look at it on chrome, what browser are you using? Commented Aug 8, 2011 at 9:22
  • Is it working in Firefox 5 for you? Commented Aug 8, 2011 at 9:25
  • why you use slash after the content: ? Commented Aug 8, 2011 at 9:32
  • 1
    content:\": "; is an error. You should have simply validated your CSS: jigsaw.w3.org/css-validator (use CSS3 profile in advanced options) Commented Aug 8, 2011 at 9:52

3 Answers 3

3

At least firefox Doesnt seem to understand this label:after { content:\": "; } i have no idea whats going on here but all i know is that it is the culprit. I've never actually used content properly.

But, remove those lines and everything runs smoothly.. ( OR reformat those two lines as Kyle showed and it should do it. )

Seems like it doesnt like to have closing semicolons in the same row with everything else

http://jsfiddle.net/Aw239/3/

Or.. get rid of the \'s ?

Sign up to request clarification or add additional context in comments.

2 Comments

The problem is that backslash. It shouldn't be there.
@Eric But it's so cool and everyone else is doing it.. But seriously though it's existence is a big question mark to me.
1

I formatted your CSS a bit and it seems to work in my FF5. http://jsfiddle.net/Aw239/2/

3 Comments

Yes now it's working. What was the problem? why it was working in chrome but not in firefox?
Is it mean that this code will not work in single line format?
No idea why it'd work like this and not like you had it, freakin' weird!
0

It is red. Are you using IE8? Because you'll need to use the HTML5 shim if you want to style HTML5 elements.

Does this work for you?

1 Comment

No your link not working in Firefox 5 but it's fine in Chrome

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.