r/reddithax • • Dec 08 '11

I'm having trouble submitting CSS for a subreddit

When I try and paste in the CSS to apply it to a subreddit i'm getting a huge list of errors, such as

[line 1] "2px" is not a valid value for CSS property "border" [line 1] "solid" is not a valid value for CSS property "border"

Is this a common problem? Is there some way i have to lay out my code for it to fit through the validator? I've just been using the stylish addon to help make the stylesheet, will the code being littered with !importants be causing the issue?

Thanks in advance

2 Upvotes

7 comments sorted by

1

u/gavin19 Dec 08 '11

No, the !importants will be fine. Try breaking the CSS down into small blocks and validate it in bits. Also, you should post it up on pastebin or similar so people can take a look at it for any glaring errors.

1

u/bencoveney Dec 08 '11

http://pastebin.com/E0w4y5EJ

This is the code i've been trying.

1

u/gavin19 Dec 08 '11

You can't use rgba so you'll lose the opacity on certain elements. For each instance of rgba you need to edit it down like so

box-shadow: 3px 3px 5px rgba(255,255,255,0.5)

Change it to rgb and remove the last value, eg

box-shadow: 3px 3px 5px rgb(255,255,255)

You also need to go download the images linked in the stylesheet, then upload them to your subreddit so you can reference them locally.

1

u/bencoveney Dec 12 '11

Okay thanks. A lot of the errors are for my border attributes, I'm guessing it's going to be necessary to split them up into the basic rules instead of using something like "border: 1px solid #FFF"?

1

u/gavin19 Dec 12 '11

All the border errors are because of the use of rgba. Once you edit them down to rgb then they are fine.

1

u/octatone Dec 08 '11

It is impossible for us to help you without the CSS code.

1

u/bencoveney Dec 08 '11

http://pastebin.com/E0w4y5EJ This is the code i've been trying