Complete Entry

Easy Top Corner Banners with CSS

  • Posted at: 1:02 pm
  • Filed in: Design

Tags:

Corner banners have been a popular web trend for a long while now. Last year you could not visit anyone’s website without seeing some type of banner stripe. I recently received quite a bit of heat concerning an anti-IE banner that I was displaying on my site, but even more questions on how I actually created the banner. The CSS needed to accomplish these corner banners is fairly simple and can be modified to accommodate any size image banner you choose. Below is a simple example of both left and right top corner banners.

View top corner banner example.

Comments

  1. That’s nifty! I have an IE warning banner on my blog as well. I will consider to use this instead. Thanks!

  2. Thanks for the link, and nice examples Chris :)

  3. What exactly does: text-indent: -999em; do?

  4. Daniel: The text indent style indents the actual link text — “Top Right Link Text” or “Top Left Link Text” outside of the browser window, but when styles are turned off it will display your link text.

  5. The thing I find great in this case is that these corner stripes often carry a strong message (e.g. ‘Too cool for IE’ or ‘Make poverty history’) and aren’t used solely for decoration like most trends.

    Andy.

    P.S. Thanks for the linkage. ;)

  6. This website is excellent, thank you very much for sharing such usefull codes!!!
    not even paysites offer such good content, also the blog feature with people posting comments are very well done, very well tought, knowledge defenitely comes from heaven!
    G-d bless you all. thanks to the site owners and all people participating!

    This site is inspiring me alot!! thank you

  7. Indeed! You’re a great help, Chris.

    I have not changed the IE warning banner on my site and it will stay there forever! :D

  8. thanks for this tip. I’ll definately be implementing it once K2 goes final.

  9. The nice thing about the javascript versions of the banners you’d see all over was that only the actual diagonal banner was a clickable link, whereas with CSS you have to use a big square block for the link.

  10. Nice little article here. My only issue with methods of indenting text off the screen is that it causes the link outline to extend all the way to the left and can have adverse affects. In your case, the top right banner causes a horizontal scrollbar to appear.

  11. Rafif Yalda: Which browser are you having horizontal scrollbars appear?? I don’t have any scrollbars in Safari, Firefox or IE.

    The style could be added to a basic div instead of a link and the text-indent would no longer be necessary and you wouldn’t have the square block link as Erik mentioned.

  12. I’m getting a horizontal scrollbar while clicking the right corner banner in Firefox, but not in IE.

    I rearranged things a little bit on my site to accomodate semi-transparent PNG’s in IE, and I think it led to some additional IE weirdness: only the actual banner graphic is clickable (similar to javascript versions I’ve seen), but the cursor doesn’t change to indicate a clickable link on mouseover (clicking the link still works, though).

    /shrug

  13. Phil: Add the following style to get a hand cursor on anything ya like:

    cursor: hand;

  14. Tolle Ideen für SEO-freundliche Menüs…

    Bei exploding-boy gibt es einige interessante Menüs die alle super SEO geeignet sind, da sie nur mit CSS gestyled sind.
    http://exploding-boy.com/images/EBmenus/menus.html
    VIA: csshilfe
    Technorati Tags: css, seo, suchmaschinenoptimierung, webdesign

  15. THis only works in FF for me. It seems like other css on my site is interfering with it on IE :-(

  16. thank you ,
    i’ve searched on google for more than 1 hour for this example and couldn’t find a good way on doing this.

    thank you once again

  17. I’m curious, I have implemented it half way down the side of my page to look like it’s sticking out of the background. However, I would really like it to stay where it is in relation to the table with the content in it.

    Is there a way to tie it’s position to a table?

Comments are closed.

Date & Time

You are reading “Easy Top Corner Banners with CSS”, an entry originally published on Monday, January 9, 2006 at 1:02 pm and filed under Design.

Commentary

There are currently 17 Comments on this entry. If you have something to say, feel free to leave a comment or post a trackback from your own site.

You can also follow the discussion through an RSS feed of this entry’s comments.

Related Entries

Recent Entries

Noteworthy Entries

Grab The Feeds