Menu With Rounded Corners In CSS

Posted Tuesday, May 3, 2011 by admin

This is a CSS tutorial on how to make a menu with rounded corners using background images.


Live demo of the menu, including all html code, css code and images used in this tutorial.

The first step is to create the images for the buttons in the menu. Begin by creating two buttons with rounded corners. One which will be used for the hover effect and to highlight the current page, and one which will be used for all unselected buttons.

Next you need to cut the images into two parts, one for the left corner and one for the right corner. Be sure to make the width of the right corner image large enough to cover the widest button in your menu (it will be cut off if the button is smaller). The left image should be as small as possible and cut off right after the corner. When you are done, you should have four images: highlighted left corner, highlighted right corner, unhighlighted left corner and unhighlighted right corner. In this example, the width of the right corner images is 250 pixels and of the left 10 pixels.

For the HTML code, we will be creating a list using the unordered list tag, <ul>.

<ul id="menu">
	<li><a href="#" class="highlight"><span>Home</span></a></li>
	<li><a href="#"><span>Lorem</span></a></li>
	<li><a href="#"><span>Ipsum</span></a></li>
	<li><a href="#"><span>Dolor</span></a></li>
	<li><a href="#"><span>Sit Amet</span></a></li>
</ul>

Next, we are going to style the list and add the images for the buttons:

#menu {
	float: left;
	padding: 0px 10px;
	margin: 0px;
	border-bottom: 5px solid #05480a;
}

This code will add a 5 pixel border below the menu with the same color as the highlighted button.

#menu li {
	display: inline;
	list-style: none;
	margin: 0px;
	padding: 0px;
}

The first line of code will make the menu horizontal, by removing the linebreak after each list item. The second line will remove the bullets which are displayed next to each list item.

#menu li a {
	float: left;
	color: #000000;
	text-decoration: none;
	background: url('menuleft.gif') top left no-repeat;
	margin: 0px 1px;
	padding: 9px 0px 6px 10px;
}

Left padding is to give space to the left corner image, should be the same width as the left corner image (10 pixels in this example).

#menu li a span {
	background: url('menuright.gif') top right no-repeat;
	padding: 9px 25px 6px 15px;
}

It is only possible to add one background image to each tag, so we need to use the <span>-tag for the right corner image. As we have already added 10 pixels of left padding above, the button text is centered by setting the right padding to 25 pixels and the left padding to 15 pixels.

#menu li a:hover,
#menu li a.highlight {
	background: url('menuleft-hl.gif') top left no-repeat;
	color: #ffffff;
}

Highlight the left corner if hover or “highlight” class is used.

#menu li a:hover span,
#menu li a.highlight span {
	background: url('menuright-hl.gif') top right no-repeat;
}

Same as above for the right corner.

Keyword Research Tips And Free Tools

Posted Monday, April 25, 2011 by admin

To rank well in the search engines, the keywords you target must be carefully picked. If the keywords are too broad (for example “books”, “photos” etc.), your site will have millions of competitors and little chance to rank well. If the keyword phrases are too narrow, few people are likely to search them and find your site. There are also a couple of other factors to consider when using keywords for SEO purposes:

Keyword density: The number of times a keyword or keyword phrase appear in the content of a page. It is calculated by dividing the number of times the keyword is used with the number of words total in the text. If a keyword is used 5 times in a 200 word text, the density would be 2,5%. To calculate the keyword density of a phrase with two or more words, you need to multiply the number of words in the phrase with the number of times it appears. For example, if the phrase “xword yword zword” is used 6 times in a 600 word text, the keyword density would be ((3*6)/600)*100 = 3%. It’s best to focus on just one word or phrase per page, especially for competitive terms. A keyword density of around 2-4% is considered optimal by many. A useful tool to easily calculate the keyword density is the Keyword density analyzer.

Keywords in title and headings: Probably the most important places to put the keywords. Having the right keywords in the title tag will also increase click through rate from the search engines. People are more likely to click a link if the title includes the phrase they have searched for.

Keywords in URL: Most search engines use the keywords in the domain name as part of their ranking formula. Use the domain name to target one or two of your most important keywords.

Keywords in backlinks: Keywords in the anchor text of inbound links is one of the most important factors in ranking well in the search engines. The anchor text should reflect the content of your page and if the links is from a related site, the value of the link will be higher. However, don’t use the exact same keywords on every link. Make sure you vary your anchor links to make them look more natural.

Three Free Keyword Research Tools

Adwords Keyword Tool - Keyword tool from Google. Allows you to type in any word and get a ton of suggestions on synonyms and phrases related to the keyword. It will also give you an estimate on how many searches the keyword gets per month, both globally and by country.

WordStream - A tool that allows you to enter a keyword phrase and get a list of related phrases and keywords. Useful to find new phrases that might not have found otherwise.

SEO Book - Allows you to enter keywords and get an estimate of the daily search volume on Google, Yahoo and Bing.

The Best YouTube Alternatives

Posted Thursday, February 10, 2011 by admin

Six video sharing sites which are great alternatives to YouTube:

Vimeo is a popular video sharing site that was founded in 2004. Vimeo allows users to upload videos in several different formats and has full support for 720p high-definition video. With a desktop uploader users can easily upload multiple videos without visiting the site. They do not allow gaming videos, commercial videos or pornographic content. Basic users (free accounts) are allowed 500 MB per week in uploads. For more features there is an upgrade available, Vimeo Plus, which cost $60 per year. Vimeo plus users get 5000 MB per week in storage space, are allowed to upload unlimited amount of HD videos, can download an unlimited number of videos and get access to more detailed statistics.

Dailymotion has been online since 2005 and is based in Paris, France. The site currently gets over 72 million pageviews per month and is one of the top 50 sites in the world. Standard users can upload MP4, AVI and MOV videos with a resolution of 640×480 (4:3) and 720×480 (16:9) and audio bitrate of 320 kbps stereo. Users who create original content (MotionMaker user account) and official content producers (Official User account) are allowed to upload videos with unlimited length in high definition format (1280×720 resolution). In June 2009 Dailymotion launched their HTML5 player which allows users to view videos without the the need to install the Adobe Flash plugin.

LiveLeak is a video site focusing on media, news and reality-based content such as war, terrorism and politics. The site was founded in 2006 by the company behind Ogrish.com. LiveLeak became well-known in 2007 when the execution video of Saddam Hussein was leaked and posted on the site. Basic membership is free but upgraded users ($9.95/month) get more features, including 500 MB limit on videos, higher quality videos, direct download links, no advertisements and access to the premium forum sections.

Metacafe is a video sharing site that focuses on entertainment. The site was founded in 2002 and currently has over 40 million unique visitors per month. Unlike many video sites, Metacafe does not allow any kind of video to be posted. Instead the site specializes in short-form original content - the average video is just 90 seconds long. Everything on Metacafe is determined entirely by it’s users. Videos are generated by the users and selected, reviewed and rewarded by the community. For example, the thousands of videos that are uploaded each day are reviewed and approved by a panel of 80,000 volunteers.

Hulu is an online video service founded in 2007 that provides content from more than 225 content producers including Fox, NBC, Warner Bros and Paramount. Hulu is ad-supported and provides users with free streaming video of TV-shows such as Glee, Family Guy, The Office and House. The content is currently only offered to users in the United States. Videos can be watched in Flash Video format with a 480p resolution on the Hulu website or in a stand-alone desktop program called Hulu Desktop which is available for Windows, Mac and Linux. Upgrading to a HuluPlus account costs $7.99 per month and gives the user access to 720p (HD) videos and access to full seasons and series of several popular shows.

Break.com is a humor site which provides users with videos, pictures, flash games and other content. The site was launched in 2004 and is one of the top 600 most viewed sites in the world according to Alexa. For uploads, the maximum size is 500 MB per file and a total of 5000 MB per user. A large number of file formats are supported, including mpeg, wmv, divx, avi and mov. For users who produce original content it is possible to earn money if the content is posted on one of Break.com’s featured pages.

15 Three Column CSS Templates

Posted Wednesday, April 21, 2010 by admin

15 excellent three column CSS templates with valid XHTML code. These templates are all free to download and use.

1. Aqueous Light

Read more »

10 Video Wordpress Themes

Posted Thursday, April 8, 2010 by admin

10 good looking WordPress themes for video blogging (vlogging)

Foxinni Video Theme (Free)

Read more »

10 Dark Joomla Templates

Posted Monday, February 9, 2009 by admin

Ten high quality templates for Joomla with dark background colors.

1. My Portfolio

Read more »

10 Good Free phpBB3 Themes

Posted Saturday, September 13, 2008 by admin

Ten usable and great looking templates for your phpBB3 forum.

1. Serenity

Read more »

Welcome!

Posted Monday, June 30, 2008 by admin

Weclome to the blog!