PDA

View Full Version : top navigational bar (centering)



inikam
11-17-2004, 02:37 PM
Is it possible to put a simple code in the dhtml to align the bar center? All of the menus start to the left.

thank you

cr3ative
11-17-2004, 02:39 PM
wtf

Provide a link.

cr3ative

sirjakeyjake
02-05-2005, 01:05 AM
Here, I'll provide, as I have the same question:

Top Navigational Bar II
http://www.dynamicdrive.com/dynamicindex1/topnavbar.htm

All I want to do is center the headings inside the nav boxes. The in-script comments say to uncomment in this one place to center the bar. The help on the DD page says that should center the bar as well as the individual headers. It won't center those header for some reason.

Any help would be appreciated...thanks!

=jb=

cr3ative
02-05-2005, 10:47 AM
Do you mean:

setAlign(alignment) Given a value of "left", "center" or "right" this will change the position of the headers relative to the bar. If a numeric value is given instead, the headers will be moved to the position that many pixels from the left edge of the bar. The headers will be repositioned dynamically if the bar has already been created.

cr3ative

sirjakeyjake
02-05-2005, 11:11 PM
Yes...that and the comments in the part of the script that's supposed to be inserted in the <head> of the page, which says:
-----------------------
//uncomment below line to center the menu (valid values are "left", "center", and "right"
//myNavBar1.setAlign("center");
-----------------------

It appears to me that these two sets of instructions are to create the same result. However, when uncommenting the second line, the headers remain in their default left-aligned position.
I thought perhaps another "setAlign" needed to be put somewhere. I've tried in some logical places (logical to me, anyway), but with negative results.

Thank you for your time,

=jb=

FPit
02-06-2005, 01:10 PM
Strange... I tried in some illogical places and got positive results.

sirjakeyjake
02-07-2005, 06:20 AM
Strange... I tried in some illogical places and got positive results.

Care to share any? :) I've tried it in several places, and though the bar itself may be centered, the headings never are.

sirjakeyjake
02-08-2005, 04:12 PM
If needed, I could always provide the page where I'm using it to someone (cr3ative?), through other channels, of course.

Thank you!

=jb=