www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 29

Thread: Menubar

  1. #1
    Join Date
    Nov 2002
    Location
    Aberdeen, Scotland
    Posts
    10

    Menubar

    I am unsure how to put a menubar on the right hand side of my website? Does anyone have to code 4 it.

  2. #2
    Join Date
    Nov 2002
    Location
    Peterborough, UK
    Posts
    166
    Have a look at http://javascript.internet.com

    There's a section for 'Navigation' where you can borrow someone else's code.
    ....Rodders

  3. #3
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Aack! If you use JavaScript for navigation then people who aren't using JavaScript will not be able to navigate your site.

    There is some disagreement on this issue, but if you are putting the nav bar on the right edge of the screen then it might not be such a bad thing to go ahead and use the TABLE element. ( http://www.w3.org/TR/html401/struct/tables.html ) In general, the problem with tables is that most non-graphical browsers simply ignore the tags. This means that if you put the bar on the left then the user of an audio browser will have to listen to all of you nav links before getting to the meat of the page. And imagine listening to all of that on each page of your site. Putting the nav on the right avoids this problem. On the down side tables do have meaning when applied to tabular data so certain non-graphical browsers use other means to help the user figure where in the table they are. Using tables in this manner will only confuse those browsers.

    Stefan is much better at this sort of thing than I, but you can get an idea of the proper methods to use at http://www.godlyplay.org/home.shtml . The style sheets are at http://www.godlyplay.org/style.css and http://www.godlyplay.org/menu.css .

  4. #4
    Join Date
    Nov 2002
    Location
    Peterborough, UK
    Posts
    166
    Actually, being as this thread is in the HTML forum and there was nothing in the original post asking for a dynamic or dropdown style menu, maybe all that is required is a simple FRAMESET.

    So, Denzil, if you learn how to use FRAMESET and the FRAMES and links within you can quite easily make a simple menu.

    You can have a look at my site, which uses this very method of navigation. Go to View Source and nick as much as you like.

    My Site
    ....Rodders

  5. #5
    Join Date
    Nov 2002
    Posts
    631
    There are so many different styles of navigation bars. To make the simpliest one, make a table:

    <table align="left" width="n" cellspacing="n" cellpadding="n" border="n"> * n is a number who want those attributes to be in pixels or percent*

    <tr>
    <td>
    <a href="http://www.site-you-want-to-link-to.com">Item 1</a>
    <br>(or <p> for double space)
    another link

    And just repeat the link for each item you want. You end the table by putting:

    </td>
    </tr>
    </table>

    You can make much better one's with CSS and advanced HTML. Hope that helps!

  6. #6
    Join Date
    Nov 2002
    Location
    Aberdeen, Scotland
    Posts
    10
    how big should a normal menu bar be?

  7. #7
    Join Date
    Nov 2002
    Location
    Aberdeen, Scotland
    Posts
    10
    can i get the code for the better menubars if anyone has it?

  8. #8
    Join Date
    Nov 2002
    Location
    Aberdeen, Scotland
    Posts
    10
    can some-one go to http://uk.geocities.com/redhotchilip...mad/page1.html and tell me how to improve my menubar and also suggestions and code for a better looking one

  9. #9
    Join Date
    Nov 2002
    Posts
    631
    Your menu should never really be much more than 300 pixels. You can get the code by looking on other site or go to www.geocities.com/html_webpages. That is my site but it's still under contruction. HEAVILY. There is a menu though.

  10. #10
    Join Date
    Nov 2002
    Posts
    631
    You can change the color of the menu I gave by putting bgcolor="whatever" inside the table tag.

  11. #11
    Join Date
    Nov 2002
    Posts
    421
    I second the vote for frames. Easy, every modern browser can deal with it.

  12. #12
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,224
    you just want the side of your site to have a menu right?
    here is what I usually do to set up my sites table wise (in my opinion tables are the most important thing to learn in html)
    <table border="x" cellspacing="x" cellpadding="x" width="100%">
    <tr>
    <td>left nav
    </td>
    <td>content
    </td>
    <td>ur right nav
    </td>
    </tr>

    well that is mega watered down but a lot of people like rowspan for their nav bars and you should definatly look into it but this is the approach I usually take. I didnt read everyone elses posts so someone alredy probably told you this. You can view the source of www.barbaricsoftware.2ya.com if you want to see exactly what I did. I am not exactly the most experience person here though so you shouldnt listen to me as intently as you would rich bull or that guy over in java script whose name I just forgot. You know the one with the taz gif for his avatar thing

  13. #13
    Join Date
    Nov 2002
    Posts
    984
    AAAARGH!

    Don't abuse <table> for something like a menubar. <table> is for making tables, not creating general page layout.

    Instead of this crap :
    <table align="left" width="20" cellspacing="10" cellpadding="20" border="n">
    <tr>
    <td>
    <a href="index.html">Home</a>

    <br>
    <br>
    <a href="http://www.site-you-want-to-link-to.com">Item</a>
    <br>
    <br>
    <a href="http://www.site-you-want-to-link-to.com">Item</a>
    <br>
    <br>
    <a href="http://www.site-you-want-to-link-to.com">Item</a>
    <br>
    <br>
    </td>
    </tr>
    </table>

    Do something like this


    <div class="menu">
    <a href="index.html">Home</a>
    <span> | </span>
    <a href="http://www.site-you-want-to-link-to.com">Item</a>
    <span> | </span>
    <a href="http://www.site-you-want-to-link-to.com">Item</a>
    <span> | </span>
    <a href="http://www.site-you-want-to-link-to.com">Item</a>
    </div>

    CSS:
    .menu {position:absolute; top:100px; left:50px; width:200px;}
    .menu span {display:none;}
    .menu a {display:block; padding:20px 0; text-align:center;}

    This will make it look good both in graphical as well as non graphical and/or old browsers. You can add borders etc to your liking as well.
    // Stefan Huszics

  14. #14
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,224
    What browsers don't read css? Do you think an old netscape whould? Ill have to get to webmonkey and look at their browser charts because I am using them more and more often. A css menu is a really great idea it make things a lot more organised too like your code wond be as jumbled and you wont have to leave those dumb indenatations so you wont get lost like when youn use tables

  15. #15
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,224
    Also that menu would be a horizontal bar how would you make a vetical bar

    <div class="menu">
    <a href="index.html">Home</a>
    <br>
    <a href="http://www.site-you-want-to-link-to.com">Item</a>
    <br>
    <a href="http://www.site-you-want-to-link-to.com">Item</a>
    <br>
    <a href="http://www.site-you-want-to-link-to.com">Item</a>
    </div>
    like that?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles