Welcome Guest ( Log In | Register )

Welcome Guest

Welcome to TutorialFx.com. As a guest, you are restricted from accessing all areas of the forum, including the ability to show off your artworks - such as sigs or templates - in our gallery, request support for tutorials, or talk with other members from all around the world.

Registration is free, and takes no more than 2 minutes to complete. Becoming a member will also allow you to view every section of the forum, and unlock hidden sections, such as SOTW Competitions, Request sections, Renders and Support. Thanks, and enjoy your time at TutorialFx.com!


2 Pages V 12Next »  
Reply to this topicStart new topic
Tabbed navigation, Like the tabs on TutorialFx.com
Rating 5 V
Ghost
post Jul 4 2006, 07:52 PM
Post #1



Administrator
*****

Group: Admin
Posts: 5,721
Joined: 12-February 05
From: Australia
Member No.: 1


This tutorial will teach you how to make a tabbed navigation for your site using lists and css.

To begin, create a new .html document, and add the following information into the <head> section of your page.

CODE
<style type="text/css">
#tabs{
padding:0;
margin:0;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color:#FFF;
font-weight:bold;
}
#tabs ul{
list-style:none;
margin:0;
padding:0;
}
#tabs ul li{
display:inline;
margin:0;
text-transform:capitalize;
}
#tabs ul li a{
padding:5px 16px;
color:#FFF;
background:#E7A272;
float:left;
text-decoration:none;
border:1px solid #D17B40;
border-left:0;
margin:0;
text-transform:capitalize;
}
#tabs ul li a:hover{
background:#EAEAEA;
color:#7F9298;
text-decoration:none;
border-bottom:1px solid #EAEAEA;
}
#tabs ul li a.active{
background:#EAEAEA;
color:#7F9298;
border-bottom:1px solid #EAEAEA;
}
#content{
background:#EAEAEA;
clear:both;
font-size:11px;
color:#000;
padding:10px;
font-family:Arial, Helvetica, sans-serif;
}
</style>


This code gives us the styling we need to make out navigation tabs. It uses lists, and each part of the list has been styled to create the tab like effect.

Feel free to modify/experiment with any of the above code to suit your needs.

After you have added that, create a div with the tabs id, and make a list with links inside. My example is shown below.

CODE
<div id='tabs'>
<ul>
<li><a href='#'>Home</a></li>
<li><a href='#'>Forums</a></li>
<li><a href='#' class='active'>Tutorials</a></li>
<li><a href='#'>Downloads</a></li>
<li><a href='#'>Links</a></li>
</ul>
</div>
<div id='content'>You main content goes here!</div>



This will create something VERY similar to the menu we have here at TutorialFx.com

Enjoy! thumbsup.gif


--------------------

Adobe Photoshop Tutorials - IPBForumSkins
#InternetExplorer { display: properly_please; }
Go to the top of the page
 
+Quote Post
Escrima
post Jul 5 2006, 08:32 PM
Post #2



Your Friendly Mod
*****

Group: Members
Posts: 1,695
Joined: 19-February 05
From: United Kingdom
Member No.: 45


Great Tutorial Ghost! smile.gif


--------------------
Go to the top of the page
 
+Quote Post
MichaelD
post Jul 6 2006, 01:30 AM
Post #3



Newbie
*

Group: Members
Posts: 66
Joined: 13-May 06
From: Derry, Ireland
Member No.: 3,884


Ghost i used this for my site but it will only be up til like september, i hope you dont mind.


--------------------
IPB Image
Go to the top of the page
 
+Quote Post
CanadaRox
post Jul 10 2006, 03:57 PM
Post #4



Got Root?
****

Group: Members
Posts: 813
Joined: 4-May 05
From: Toronto, Ontario, Canada
Member No.: 628


Great tutorial. thumbsup2.gif Only problem is its missing a border on the left of the first button. I can't seem to find a way to fix it either thumbdown.gif


--------------------

Other gods are fictitious. How come yours isn't?

game game game game game
Go to the top of the page
 
+Quote Post
Ghost
post Jul 10 2006, 04:07 PM
Post #5



Administrator
*****

Group: Admin
Posts: 5,721
Joined: 12-February 05
From: Australia
Member No.: 1


Yeah, if I added that in the css, then the borders would double up on each tab and would look bad unsure.gif

Replace your code with this:
CODE
<div id='tabs'>
<ul>
<li><a href='#'  style='border-left:1px solid #D17B40;'>Home</a></li>
<li><a href='#'>Forums</a></li>
<li><a href='#' class='active'>Tutorials</a></li>
<li><a href='#'>Downloads</a></li>
<li><a href='#'>Links</a></li>
</ul>
</div>
<div id='content'>You main content goes here!</div>


That should fix it up. thumbsup.gif


--------------------

Adobe Photoshop Tutorials - IPBForumSkins
#InternetExplorer { display: properly_please; }
Go to the top of the page
 
+Quote Post
Brady
post Jul 10 2006, 04:20 PM
Post #6



King Nothing
*

Group: Members
Posts: 77
Joined: 2-June 06
From: Surrey BC, Canada
Member No.: 4,016


Nice tutorial Ghost!!


--------------------

My idol
Go to the top of the page
 
+Quote Post
Ghost
post Jul 10 2006, 04:29 PM
Post #7



Administrator
*****

Group: Admin
Posts: 5,721
Joined: 12-February 05
From: Australia
Member No.: 1


Thanks biggrin.gif


--------------------

Adobe Photoshop Tutorials - IPBForumSkins
#InternetExplorer { display: properly_please; }
Go to the top of the page
 
+Quote Post
Brady
post Jul 10 2006, 06:05 PM
Post #8



King Nothing
*

Group: Members
Posts: 77
Joined: 2-June 06
From: Surrey BC, Canada
Member No.: 4,016


So if you posted it as a tutorial does that mean we can use it on our sites?


--------------------

My idol
Go to the top of the page
 
+Quote Post
Shadow01
post Jul 10 2006, 06:30 PM
Post #9



Newbie
*

Group: Members
Posts: 4
Joined: 10-May 06
Member No.: 3,867


Great tutorial Ghost! This is what I have been bugging you for! smile.gif I have been contacting you through your IPB Forums Skins e-mail trying to get you to give me that code! Thank you!!! smile.gif
Go to the top of the page
 
+Quote Post
Ghost
post Jul 10 2006, 06:32 PM
Post #10



Administrator
*****

Group: Admin
Posts: 5,721
Joined: 12-February 05
From: Australia
Member No.: 1


I guess. It was meant for learning purposes, but you can use it thumbsup.gif


--------------------

Adobe Photoshop Tutorials - IPBForumSkins
#InternetExplorer { display: properly_please; }
Go to the top of the page
 
+Quote Post
Brady
post Jul 11 2006, 05:54 AM
Post #11