We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Updating Navigation Bar (Help!) | Forum

Topic location: Forum home » Support » General Questions
Ash
Ash Apr 15 '15
So I am trying to update the navigation bar on our site http://www.cobuildee.x10host.com but I edited the nav bar using HTML instead of PHP (And I guess you can only use PHP to edit site look with themes/accessories which in my opinion should be HTML and CSS and PHP) and most of the users want the new nav bar. Well, is there a way I can switch the HTML code for the PHP code? (Make the HTML code allowed for the nav bar?)


Here's the new nav bar look I am trying to put on the site:



Any help is appreciated. Thanks.

Mark
Mark Apr 18 '15

Ash, if I am understanding correctly you want the default horizontal nav bar to look much differently and use the graphics you showed in your post?


If this is the case you shouldn't need to fiddle with any html or PHP for that matter and it can all be done via CSS.


Upload your graphics that you want to use for your nav bar and make a note of the path and their names. Now in the admin click on Appearance and Edit Theme and then CSS


In the upper block you will see a lot of css and in the lower block you can write your own CSS. If you're not sure of the names of items you can use developer tools in Chrome, IE, Firefox etc. to discover the names. Don't quote me on this but maybe the default nav DIV is ow_menu_wrap and the UL is ow_main_menu and the LI's might vary depending on tab/page names...


Anyway enter your own custom css and style that navbar however you please. Use your images as background images and feel free to add padding, margins, etc. You can tweak it for :hover, :visited etc. etc. the sky is the limit you can do whatever you dream up.


By doing it via CSS you won't lose your CSS mods on core updates which is nice. Also, the menu is tied into the admin with a nice drag and drop interface and other cool built in features so you don't want to recode/hard-code a bunch of stuff and mess up all those linkages :-)