Corner Placed Highlights

February 3rd, 2008 | This article was viewed 574 times so far...
Corner Placed Highlights

A few weeks ago, a friend of mine asked me how the floating banner on the upper right corner was done (refer to the title image for this article). I explained the details to him already but I think it’ll be great for everyone else know how it is done, so here it is!

By the way this is also the first of the many XHTML / CSS related guides coming your way.

When To Use This

This is one of the most handy ways to inform your readers of something important. In my case, I use it to highlight promotions from goldfries.com. Some of you might remember that I’ve used this on my personal blog before as well.

The content could be and image, or just plain text or both. In fact, you could put anything in there just as how other contents are placed on a website.

Now before we move on, I wish to highlight that while this corner placed highlights function is useful, one must be careful in deciding the size of the content. Make sure it’s tastefully done to avoid any disruption to the site’s design and purpose.

The CSS Portion

1
2
3
4
5
6
7
8
#thecorner /* put any name you want. it has to be unique.*/
{
	position:absolute;
	top:0px;
	right:0px; 
	/*use left:0px if you would like 
	the banner to appear on the left. */
}

With the above CSS, the highlight will appear on the upper right side of the page. It’s less distracting and it doesn’t collide with the main image header.

You could also specify the width of the holder by defining the WIDTH property.

The HTML Portion

1
2
3
4
5
<div id="thecorner ">
	<a href="http://www.goldfries.com">
	<img src="images/togoldfries.com" alt="goldfries"/>
	</a>
</div>

Now as you can see, I’m loading an image and making the image a link to a page of my choice. That doesn’t mean you have to do the same. Remember, it could be any content. A short paragraph, image and paragraph combo, or even a tiny FLASH content. It’s entirely up to you!

So there ya have it, give it a try. Do drop by if you need any assistance on implementing this on your site.





Like this article? You can share it to the world with »
Digg StumbleUpon reddit del.icio.us Ma.gnolia Technorati
big divider

Conversations for “Corner Placed Highlights”

  1. Gravatar at goldfries.com vkeong said :

    This is nifty.. will try it hehe

    Thanks for sharing

  2. Gravatar at goldfries.com goldfries said :

    Hey, I see you’re using it now! But you’re promoting TNX instead. Emoticon 

  3. Gravatar at goldfries.com vkeong said :

    Yeah! I am figuring how to make the highlights follow to scroll down along the page

  4. Gravatar at goldfries.com goldfries said :

    Ahh, well this one doesn’t. To make it follow along the page you would need javascripts like those used in YouthMalaysia’s Y voting logo.

  5. Gravatar at goldfries.com - c H i E n - said :

    hey thanks! I have been searching for it for a long time. Just one question, the image i design, I have to make it into a triangular shape? Thanks a lot ok!! thanks thanks thanks!

  6. Gravatar at goldfries.com goldfries said :

    No, there’s no RULE on the shape of the image. In fact, it doesn’t have to be image either. Emoticon Just do what suits your site best.

  7. Gravatar at goldfries.com - c H i E n - said :

    Alright thanks again!!!

Have Something To Say?

bottom shade
bottom shade

My Beloved Readers

bottom shade wide

© 2007 - 2008 goldfries.com | Powered by WordPress | Theme by goldfries | goldfries.com is 540 days old