www.webdeveloper.com
Results 1 to 2 of 2

Thread: Please help!

  1. #1
    Join Date
    Feb 2010
    Posts
    10

    Please help!

    I need to figure out how to have a one word showing in the left hand corner of a webpage and when you click on that one word (pretend the word is "CLEAN") When you click on the word CLEAN, several words appear to the right of the word CLEAN all in a horizontal row. (Would look kind of like a navigation bar) Anybody know how to do this?

  2. #2
    Join Date
    Oct 2007
    Location
    Western Massachusetts, USA
    Posts
    387
    Here is something I just whipped up for you. Change as needed if it is what you want.

    Code:
    <html>
    <head>
    <script type="text/javascript" langauge="javascript">
    var navbar_expanded = true;
    function toggleNavbar() { document.getElementById("navmenu").style.display = navbar_expanded?"none":"block"; navbar_expanded = !navbar_expanded; }
    </script>
    <style type="text/css">
    #navbar {
    position: absolute;
    top: 0px;
    left: 0px;
    }
    #navbar td {
    border: solid 2px #000000;
    color: #cccccc;
    background-color: #666666;
    }
    #navcontrol a {
    display: block;
    width: 100&#37;;
    height: 100%;
    text-decoration: none;
    }
    #navcontrol a:link, #navcontrol a:active, #navcontrol a:visited, {
    color: #cccccc;
    background-color: #666666;
    }
    #navcontrol a:hover {
    color: #ffffff;
    background-color: #999999;
    font-weight: bold;
    }
    </style>
    </head>
    <body onload="toggleNavbar()">
    <table cellspacing="0" cellpadding="0" border="0" id="navbar">
    <tr>
    <td align="center" valign="center" id="navcontrol">
    <a href="#" onclick="toggleNavbar()">NAV</a></td>
    <td align="center" valign="center" id="navmenu">
    Some links or text goes here...
    </td>
    </tr>
    </table>
    </body>
    </html>
    Computer programmer / web developer.

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