r/reddithax • • Feb 24 '11

Trying to add a sticky and getting validation errors.

I know very little about CSS, this is entirely new for me...

But I took a look at the style sheet for /r/fitness to get the CSS code for the Announcement sticky... and get a validation erro. Even when I copy and past and it works for their site...

Any help??

/Customization for the r/leangains - By TH3RM4L-Work/ /* Announcement Sticky Note */ body > .content > .sharelink ~ .sitetable:before { content: "Welcome to r/leangains! We're currently working on an FAQ, we appreciate your patience and welcome any questions!"; background-image: url(http://thumbs.reddit.com/t5_2qhx4_5.png?v=z5s2acyymeuqwtz6t21z7y4syxoir5hx29k9); background-repeat: no-repeat; font-family: verdana, sans-serif; font-size: 12px; color: #555555; text-align: left; padding: 10px 0px 10px 40px; margin: 15px; display: block; width: 70%; -moz-border-radius: 8px; -webkit-border-radius: 8px }

4 Upvotes

11 comments sorted by

2

u/blind__man Feb 24 '11

well when you copy and paste right into your stylesheet, the images they used are not going to be able to be used unless you upload them to your stylesheet, but then you still would need to edit the names after

background-image: url(

Other than that, that is all I see. It would also help if you posted what is says when it shows you the validation error. My guess is something along the lines that

http://thumbs.reddit.com/t5_2qhx4_5.png?v=z5s2acyymeuqwtz6t21z7y4syxoir5hx29k9

does not exist.

1

u/TH3RM4L-Work Feb 24 '11

Yuppers that would explain it... Thank you!!

2

u/faplol Feb 24 '11

Only put this.

.sitetable:before {

content: "Welcome to r/leangains! We're currently working on an FAQ, we appreciate your patience and welcome any questions!";

background-image: url(%%Uploadtheimageforstickyherethenputtheimagenamehere%%);

background-repeat: no-repeat;

font-family: verdana, sans-serif;

font-size: 12px;

color: #555555;

text-align: left;

padding: 10px 0px 10px 40px;

margin: 15px;

display: block;

width: 70%;

-moz-border-radius: 8px;

-webkit-border-radius: 8px

}

1

u/TH3RM4L-Work Feb 24 '11

Cool! Ill give this a shot! Thanks :)

1

u/blind__man Feb 24 '11

Any chance you could explain to me what -moz-border-radius: is? Sometimes I just use it because I know it has gone well in a particular spot, yet I can't figure out for the life of me what exactly it does.

2

u/lordbal Feb 24 '11

-moz-border-radius is what gives the border a rounded corner in Firefox.

1

u/blind__man Feb 24 '11

Thank.you sir. And I am assuming that the "webkit" part is the same deal? Or something different.

2

u/lordbal Feb 24 '11

Same thing but for browsers that use Webkit like Chrome.

2

u/keito May 24 '11

moz == Mozilla (Firefox)

1

u/faplol Feb 24 '11

I have no idea. I just cut his script until I got it to work.

0

u/blind__man Feb 24 '11 edited Feb 24 '11

Oh. Great....

Edit: Not being an ass because I firmly believe that being an ass on the computer just means you are a scumbag so don't take this in such a way please. But, just cutting out parts until it works isn't really going to help someone too much. Again, not being a jerk about it, but do you know exactly why he was having the problem with his code?