Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

improve nav with css


ian_m

Recommended Posts

Posted

I want to give my navigation the look of having buttons by styling the links with css as you can see here.

 

This means that instead of the navigation output being this

 

<a href=domain?cPath=ectect">Gold Collection</a>

 

I need somehow to make the output this

<div id="navcontainer">

<ul id="navlist">

<li id="active"><a href="index.php" id="current">Home</a></li>

 

</ul>

</div>

 

Now Having had a quick look the whole menu being called in by an include from categories.php

 

This is where i get stuck, my php is as good as an underwater hairdrier, in categories.php on line 20 is this variable $categories_string .= '<a href="';

 

Now am I really guessing but i thought no problem just add in my css like this

 

$categories_string .= ' <li id="active"><a href="'</li>;

 

Now I have no idea if that would work, even if it did how would I get <div id="navcontainer"><ul id="navlist"> to appear just once at the start of the menu then </ul> </div> to appear once at the bottom of the menu.

 

Now when I had this idea I really felt I was on the edge of greatness but now I am not so sure, so if anyone knows some php and give me some tips on how do do this that would be great.

 

Regards

Posted
I want to give my navigation the look of having buttons by styling the links with css as you can see here.

 

This means that instead of the navigation output being this

 

<a href=domain?cPath=ectect">Gold Collection</a>

 

I need somehow to make the output this

<div id="navcontainer">

        <ul id="navlist">

          <li id="active"><a href="index.php" id="current">Home</a></li>

         

      </ul>

      </div>

 

Now Having had a quick look the whole menu being called in by an include from categories.php

 

This is where i get stuck, my php is as good as an underwater hairdrier, in categories.php on line 20 is this variable $categories_string .= '<a href="';

 

Now am I really guessing but i thought no problem just add in my css like this

 

$categories_string .= ' <li id="active"><a href="'</li>;

 

Now I have no idea if that would work, even if it did how would I get <div id="navcontainer"><ul id="navlist"> to appear just once at the start of the menu then </ul> </div> to appear once at the bottom of the menu.

 

Now when I had this idea I really felt I was on the edge of greatness but now I am not so sure, so if anyone knows some php and give me some tips on how do do this that would be great.

 

Regards

 

 

Have a look in the contribution section, there are several different add-ons for css menus there....

  • 7 months later...
Posted
Have a look in the contribution section, there are several different add-ons for css menus there....

 

I bet there are. Question is "How to find them?". Run a search in the contributions search box, with the word Menus and nothing was returned (nothing significant for these matters - Easy Menu Maker V 1.0 doesn't makes what we need here).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...