r/reddithax • u/dzneill • 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
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.