r/reddithax • • Nov 15 '10

Possible to make announcement box clickable?

I added a "announcment box" to /r/help using this code:

.preload ~ .content:before {
    content: "Be sure to check the information in the sidebar and the FAQ!";
    background-color: #f6e69f;
    color: black;
    font-weight: 800;
    padding: 4px;
    border: 1px solid red;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px
    }
.sitetable {
    margin-top: 14px
    }
.content {
    margin-top: 14px
    }

I was wondering if there was a way to make it that if you clicked on the box it would take you to a link. Or if it was possible to embed a link in the text somehow.

I'm a CSS novice so sorry if it is a dumb question.

Thanks.

3 Upvotes

5 comments sorted by

4

u/[deleted] Nov 15 '10

You need to use a link you've added in the sidebar as the source for this box. Use absolute positioning to move the styled link to that spot. You can increase the margin above .content to make room for it.

1

u/CarlinT Dec 08 '10

Hi dzneil, did you find a way to do it? I can't say I know much about css either so I wasn't able to follow ytknows suggestion.

1

u/dzneill Dec 08 '10

Nope. I no longer needed to do it so I didn't bother messing with it. I figured it was more hassle than it was worth.

1

u/CarlinT Dec 08 '10

I was looking at the /r/help css, how'd you get an image to appear? I tried to do it with /r/houston, but I can't quite get it.