colorpress - Premium WordPress Theme
$49.99

ColorPress is a theme that lets you play with color! Now, you will not be restricted to using a few color schemes provided by the developer. You have all the colors to apply to your theme! Just pick your color and magic happens. The theme comes with a configurable slideshow, 3 blog layouts, dropdown menus and a load of other options that will rock your socks!

Wix.com

May
10

Nifty Rounded Edges Using Only CSS

If you have a Google Analytics account, you must have seen that Google uses slightly rounded edges in the menu buttons on the left. See the picture below :-

CSS Rounded Tips

Today, I will teach you how to give these nifty little rounded edges to your menu. Given below is the CSS code. This goes into the head section of your HTML file. :-

CSS

<style>
ul {
width:180px;
list-style-type:none;
margin:0 auto;
padding:0;
}

li a {
display:block;
position:relative;
border-width:1px 0;
border-color:#ccc;
border-style:solid;
color:#555;
text-decoration:none;
margin:4px 1px;
}

li a span {
display:block;
position:relative;
margin:0 -1px;
border-width:0 1px;
border-color:#ccc;
border-style:solid;
background-color:#eee;
padding:2px 6px;
}

li a:hover {
border-color:#aaa;
color:#333;
}

li a:hover span {
border-color:#aaa;
background-color:#ddd;
}
</style>

Here is the HTML needed. This goes in the body of your HTML file. :-

HTML

<ul>
<li>
Home
About
Products
Services
Contact
</li>
</ul>

Once you have copied the above pieces of code into your HTML file and when you run it, you should see something like this :-

rounded edges

So, you can see that these rounded corners can be created without using any kind of images. You can download the source file here :- Download

Please let me know if you have any problems or just leave comments if you like it. :)

This post was viewed 15,597 times

» 31 people left comments { Collapse all | Expand all }

  1. Great Job Jai
    This is a pretty amazing blog…

    Reply to this comment
  2. Thanks for the good tips! Previously your tips for changing header images is good and simpe. I help my friend to setup his anime blog’s header images. :D

    Reply to this comment
  3. You are too much Jai. You giving us free lesson. LOL.
    Thank you thank you. :D

    Reply to this comment
  4. Thanks jai. Another knowledge gained. :)

    Reply to this comment
  5. Jasmin buzzed on May 11th, 2008 | 4:56 am

    Thank you. This is great! It has made life a lot easier.

    Reply to this comment
  6. This is awesome. Thank you!

    Reply to this comment
  7. Alex buzzed on May 10th, 2008 | 7:15 pm

    You can also use this:

    -moz-border-radius: 20px;
    -khtml-border-radius: 20px;
    -webkit-border-radius: 20px;
    border-radius: 20px;

    Reply to this comment
  8. Sweet&8212;thanks Jai.

    My current theme uses these nifty CSS corners, but I’m not fancy on the precisely how they’re implemented.

    I’ve been planning on cleaning up the code, for reuse in other places, and you’ve just made my job easier.

    Thanks again.

    Reply to this comment
« 4 3 2 1

    2 Trackback(s)

  1. May 11, 2008: ??????????? ?????? ????????? ?? CSS. | MishaSite.net
  2. May 11, 2008: jaehong75.com : links for 2008-05-11

» Leave a Comment!

Search :
Browse :
Archive :

$$$ Make Money $$$

Become an Affiliate

Welcome to Blog Oh! Blog's affiliate program! I personally invite you to make money by selling all of Blog Oh! Blog's Premium themes.

You will get a whopping 25% share on each sale generated through your affiliate link.

All you need to do is sign up as Blog Oh! Blog's affiliate, choose a banner, paste it on your website or blog and wait for sales to happen. It's as simple as that!

All affiliates will be paid on 10th of every month. Your affiliate earning needs to be a minimum $50 to get paid for each month.

Here is the sign up link and here are some banners to get you started!