tabbed navigation

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
i have setup css and am using <div><ul> <li> tags for my tabbed navigation.
i'd like to put the menu options in an include file. i have an <li
class="active">,  but i don't know how to set the "active" page so i am hard
coding the menu in every page.
without asking me for a URL can someone tell me how to make this work.

Re: tabbed navigation

Quoted text here. Click to load it



Sherm Pendley
Cocoa Developer

Re: tabbed navigation

Gazing into my crystal ball I observed "mcnewsxp"

Quoted text here. Click to load it

You could do it server side.  I do this all the time.

        $thisurl = "contact.php";

<div id="nav">
<li><?php nav("index.php","Home",$thisurl) ?></li>
<li><?php nav("contact.php","Contact",$thisurl) ?></li>
<li><?php nav("about.php","About",$thisurl) ?></li>

<?php funtion nav($uri,$page,$thisurl)


        {echo "<a href='$uri' class='active'>$page</a>";}
        {echo "<a href='$uri'>$page</a>";}


Mine is actually a little more elaborate than that, but I think you get
the idea.
Adrienne Boswell at Home
Arbpen Web Site Design Services
Please respond to the group so others can share

Re: tabbed navigation

Quoted text here. Click to load it

that's what i'm looking for. mine will be classic ASP for this one tho.
i'll try and adapt you code.

Site Timeline