File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes HTML/CSS: navigation bar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "HTML/CSS: navigation bar" Watch "HTML/CSS: navigation bar" New topic

HTML/CSS: navigation bar

Qunfeng Wang
Ranch Hand

Joined: Jan 28, 2005
Posts: 434
I've met problems when implementing navigation with<table> & some CSS.
  • I can't make a gap between each tab when set border-spacing:0px;
  • There is a little gap between table and <h r>

  • The original problem and image is at:

    Below is my implementation:



    To be or not to be. It's a question.
    Eric Pascarello

    Joined: Nov 08, 2001
    Posts: 15385
    You should not be using a table for navigation menus.

    You really should be using an unordered list:

    David Newton

    Joined: Sep 29, 2008
    Posts: 12617

    And it'd probably be better to use a border rather than an HR if you're trying to get a line underneath a DIV.
    ahmer afzal

    Joined: Oct 12, 2009
    Posts: 3
    ------------------ Html -------------------

    ---------------- CSS -----------------------

    Code was Perfect in All the Browsers Without Table

    Ahmer Afzal
    David Newton

    Joined: Sep 29, 2008
    Posts: 12617

    ... but hopefully they've already fixed their problem from 2.5 months ago.
    I agree. Here's the link:
    subject: HTML/CSS: navigation bar
    It's not a secret anymore!