[greenstone-users] Problem with the width of the navigation bar

From Allison Zhang
DateThu Apr 24 04:07:40 2008
Subject [greenstone-users] Problem with the width of the navigation bar
In-Reply-To (480684DD-1080901-cs-waikato-ac-nz)
Hi, Oran,

Thank you very much for your help. I tried the changes you suggested but
with no luck. The problem still exists. What puzzled me is that I used the
same macro file for over 30 collections we built and none of them had this
problem. I just built a collection yesterday using the same macro file and
the navigation bar fits perfectly with the page width. I compared the macro
file line by line for the problematic collection with the macro file for
other collections and could not find any problem. Are there any other places
should I look?



From: Oran of Greenstone Team [mailto:greenstone_team@cs.waikato.ac.nz]
Sent: Wednesday, April 16, 2008 7:00 PM
To: zhang@wrlc.org; greenstone-users@list.scms.waikato.ac.nz
Subject: Re: [greenstone-users] Problem with the width of the navigation bar

Hi Allison,

I have looked at your problem and have come up with a solution. I have
tested it on my machine and it looks good in Firefox and IE6/7. The problem
is that the each html element in the nav bar has a pixel width hard coded
in, and these widths add up to more than 780px. The solution is, create a
containing div whose width is 780px, and have all elements inside use
percentage widths instead of pixel widths.

It looks like your collection's nav bar uses images of text, rather than
text. The collection I used for testing just uses text, so this solution may
not work straight off and may need some tweaking - just let me know if you
get stuck. Here it is:

In macros/nav_css.dm, change the 'optnavigationbar' macro to this:

<div class="navbar" style="width:780px">

Change the 'navtab' macro to this:
{<div style="float:left; width:16%; background-image:
url('/gsdl/web/images/tspace.gif'); text-align:center;"><a "selected",class="navlink_sel">_2_,class="navlink" href="_1_"

And blank out the 'navbarspacer' macro:

Please write back if you have any more questions.


Allison Zhang wrote:

I just realized that I put the wrong Subject line for this message I sent
out. Please ignore my previous message and help me with this problem
stated below. --Allison

I'm experiencing a problem with the width of the navigation bar. I set
up the page width macro as 780 px:
537 {780}

but the navigation bar is always longer than the page width. I created
many collections using different page width and never had any problem. I
don't know what's wrong with this one. I compared the collection macro
file with the macro file for other collections and could not find anything
wrong. Does anybody have any idea what could be wrong? Here is the URL
for this trouble collection. The navigation bar is 817 px, 37 px longer
than the page width 780 px.


Many thanks



greenstone-users mailing list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://list.scms.waikato.ac.nz/mailman/private/greenstone-users/attachments/20080423/ac9c48a1/attachment.html