Zen Cart Logo
Forums / Upgrading to 1.5.x / Add Text to Top Navigation Bar

Add Text to Top Navigation Bar

Views: 1,371

Results 1 to 6 of 6
4 Jul 2013, 10:34 AM
#1
blue_grape avatar

blue_grape

New Zenner

Join Date:
Feb 2008
Posts:
53
Plugin Contributions:
0

Add Text to Top Navigation Bar

I am using v1.5.1

Years ago I had some text, not a link in the top navigation bar where the search box should have been. I added the text and it worked to my includes/template/custom/common/header.php

The old code that worked is below

<div id="navMainSearch"> My text here.</div> My text was aligned to the right.

In 1.5.1 the code is different and my text won't display. The code in the new file is...

<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>

I have tried inserting my text here <div id="navMainSearch">MY TEXT it didn't work.

Then I tried it here 'sideboxes/search_header.php'); ?>MY TEXT</div> again it didn't work.

Can anybody help me please?

Thanks.

4 Jul 2013, 11:10 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Add Text to Top Navigation Bar

Your first attempt should have worked. Maybe with a link to the site ...

4 Jul 2013, 12:54 PM
#3
bluegrape avatar

bluegrape

New Zenner

Join Date:
Jul 2008
Posts:
15
Plugin Contributions:
0

Re: Add Text to Top Navigation Bar

stevesh:

Your first attempt should have worked. Maybe with a link to the site ...

Thanks Stevesh

After you said the first attempt should have worked I tried it again. It now works. Last time I put a period at the end of the text and that is probably why the text didn't display.

Now that my text is there, it's a bit high. I would like to center it virtically in the navigation bar. Any ideas?

Thanks.

4 Jul 2013, 1:17 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Add Text to Top Navigation Bar

Let us see it live and we can tell you exactly what styling to apply.

5 Jul 2013, 12:07 AM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Add Text to Top Navigation Bar

There are a couple ways to do that - this is the one I would use, adding to the stylesheet:

#navMainSearch {margin: .7em .5em 0 0;}

5 Jul 2013, 10:41 AM
#6
blue_grape avatar

blue_grape

New Zenner

Join Date:
Feb 2008
Posts:
53
Plugin Contributions:
0

Re: Add Text to Top Navigation Bar

stevesh:

There are a couple ways to do that - this is the one I would use, adding to the stylesheet:

#navMainSearch {margin: .7em .5em 0 0;}

Thank you so much Stevesh, it's perfect! :D