WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Rejected Creating a Sweet Navigation Mon Nov 22, 2010 6:02 am

Drogba921


Registered Member
Registered Member
Many people need navigation bars for their websites, but not many of them know how to make them really cool.

Below is a tutorial to make your navigation show like thus on my website:

Tutorial Example:

http://www.hunnisett.us/mikesworld/experiment.cfm]EXAMPLE

___

This tutorial uses HTML, CSS and Javascript.

First off is making the menu.

For this, we'll use a UL class and a LI.

Here's the code

Code:
<ul class="sidenav">
<li>
   <a href="LINK">Title</a>
</li></ul>

Next, you need to add a description, put it in a <div>tag.

Code:
<ul class="sidenav">
<li>
   <a href="LNIK">Title</a>
   <div><p>Description!</p></div>
</li></ul>

Next, you'll need the CSS.

Here it is.

Code:
<style type="text/css">


ul.sidenav {

   float: left;

   margin: 130px 0 0;

   padding: 0;

   width: 200px;

   list-style: none;

   border-bottom: 1px solid #3373a9;

   border-top: 1px solid #003867;

   font-size: 1.2em;

}

ul.sidenav li {

   position: relative;

   float: left;

   margin: 0;

   padding: 0;

}

ul.sidenav li a{

   border-top: 1px solid #3373a9;

   border-bottom: 1px solid #003867;

   padding: 10px 10px 10px 25px;

   display: block;

   color: #fff;

   text-decoration: none;

   width: 165px;

   background: #005094 url(http://img577.imageshack.us/img577/9224/sidenavlia.gif) no-repeat 5px 10px;

   position: relative;

   z-index: 2;

}

ul.sidenav li a:hover {

   background-color: #004c8d;

   border-top: 1px solid #1a4c76;

}

ul.sidenav li div {

   display: none;

   position: absolute;

   top: 2px;

   left: 0;

   width: 225px;

   font-size: 0.9em;

   background: url(http://img607.imageshack.us/img607/697/bubbletop.gif) no-repeat right top;

}

ul.sidenav li div p {

   margin: 7px 0;

   line-height: 1.6em;

   padding: 0 5px 10px 30px;

   background: url(http://img607.imageshack.us/img607/4494/bubblebtm.gif) no-repeat right bottom;

}

</style>

Explanations:

ul.sidenav {

float: left;

margin: 130px 0 0;

padding: 0; // How much space

width: 200px; //How wide you want the sidebar

list-style: none;

border-bottom: 1px solid #3373a9; //Border color

border-top: 1px solid #003867;

font-size: 1.2em; //size of font

}


ul.sidenav li div {

display: none;

position: absolute;

top: 2px;

left: 0;

width: 225px;

font-size: 0.9em;

background: url(https://2img.net/r/ihimizer/img607/697/bubbletop.gif) no-repeat right top;

}
DO NOT EDIT, THIS IS A REQUIRED FEATURE

ul.sidenav li div p {

margin: 7px 0;

line-height: 1.6em;

padding: 0 5px 10px 30px;

background: url(https://2img.net/r/ihimizer/img607/4494/bubblebtm.gif) no-repeat right bottom; DO NOT EDIT, THIS IS REQUIRED

}

__

Next, you'll need the javascript. Add this to your <head>tag

<script type="text/javascript">

$(document).ready(function(){



$("ul.sidenav li").hover(function() {

$(this).find("div").stop()

.animate({left: "210", opacity:1}, "fast")

.css("display","block")



}, function() {

$(this).find("div").stop()

.animate({left: "0", opacity: 0}, "fast")

});



});

</script>

Also add:

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>

And this should be it!

Good luck!

http://www.codinghelp.org

2Rejected Re: Creating a Sweet Navigation Mon Nov 22, 2010 9:18 am

ankillien

ankillien
Administrator
Administrator
Nice one, but I don't find anything to learn from. There are just some codes, put them together and it works.

3Rejected Re: Creating a Sweet Navigation Mon Nov 22, 2010 3:07 pm

Lucky

Lucky
Registered Member
Registered Member
I like the effect.
Thank you for sharing. Smile

4Rejected Re: Creating a Sweet Navigation Sat Nov 27, 2010 10:35 pm

Matti

Matti
Registered Member
Registered Member
Nice tutorial

http://csshelp.forumotion.net/

5Rejected Re: Creating a Sweet Navigation Sat Nov 27, 2010 11:48 pm

Emilio

Emilio
Registered Member
Registered Member
Aah Soh Tananka tutorial Wink

http://www.graphilicious.forumotion.Com

6Rejected Re: Creating a Sweet Navigation Sun Nov 28, 2010 5:34 am

Drogba921


Registered Member
Registered Member
Emilio wrote:Aah Soh Tananka tutorial Wink

Si senor, thought it'd be nice to share Smile

Written by myself though Very Happy

http://www.codinghelp.org

7Rejected Re: Creating a Sweet Navigation Mon Nov 29, 2010 10:51 am

ankillien

ankillien
Administrator
Administrator
Sorry but we can't accept copied tutorials.

Tutorial Rejected

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum