Wrox Programmer Forums
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 3rd, 2004, 12:04 PM
Authorized User
 
Join Date: Jan 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default nav bar problems

hey folks,

I was wondering if anyone could help me with a problem I having with a drop nav bar and a table.

I have created tables which automatically resize wit the window, eg:

<tr>
    <td width=30%>
    </td>
    <TD>
        <A href="index.html">
        <IMG alt="Click to return to the main page." src="../images/logo.gif">
        </A>
        <br>
    </td>
    <td width=30%>
    </td>
</tr>

I want to place a nav bar directly under the banner image, but i dont know how to do this. At the moment, I am only able place the menu on the page in a static position. Here is the code for the nav bar:


Code:
function init() {

      // Get width of window, need to account for scrollbar width in Netscape.

      fullWidth = getWindowWidth() 
        - (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);

      myNavBar1.resize(744);
      myNavBar1.create();
      myNavBar1.setzIndex(2);
       myNavBar1.moveTo(130, 109); //this defines the starting position of the menu. (horizontal start position, vertical start) 
    }


if anyone could shed any light on this I would be really grateful - thank you!

Morris



 
Old June 3rd, 2004, 07:45 PM
Authorized User
 
Join Date: Jan 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Me again!

I was thinking after my last post, I didnt explain myself very well.
A better way to describe the problem I have is: how do you get the width of a column in an HTML table which is defined by percentage and not pixels?

I have a look in a couple of books i own, but there doesnt seem to a function to get the width of a column. Any ideas?

I am now working on the principle if i get the width of a column, I will then be able to work out the start point of the nav bar.

Again, any input and avice is gratefully recieved!

Morris






Similar Threads
Thread Thread Starter Forum Replies Last Post
Nav bars volsha Dreamweaver (all versions) 3 October 30th, 2007 02:02 AM
Nav Bar Styling VictorVictor BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 May 16th, 2006 06:02 PM
Centering of Image Within Nav Bar DuncanM CSS Cascading Style Sheets 1 April 26th, 2005 10:29 AM
How do disable Menu bar & address bar for browser bekim HTML Code Clinic 2 January 7th, 2005 12:33 AM
How to trap Mouse events on Title bar/Caption bar chiefouko Pro VB.NET 2002/2003 0 September 21st, 2004 02:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.