Topic: submenu links not working

I have this code with submenus and several divs in the primary content. I have hidden the other divs so they will not show until the menu item is clicked, but i'm stumped as to how to code the css to display it.

Here is the code:
<style type="text/css">
#header {
    background-color:#336699;
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
}
#logo {
    position: absolute;
    top: 10px;
    left: 10px;
}
#navigation ul {
    padding: 5px 0;
    margin-left: 775px;
    margin-top: 100px;
    font: 12px Verdana, helvetica, Arial, sans-serif;
}   
#navigation li {
    list-style: none;
    margin: 0 7px 0 7px;
    display: inline;
}
#navigation li a{
    color: #FFFFFF;
    text-decoration: none;
}
#primary-content {
    position: absolute;
    top: 150px;
    left: 550px;
}
.heading {
    font: bold 20px Verdana, helvetica, Arial, sans-serif;
    color:#333366
}
.title {
    font: bold 15px Verdana, helvetica, Arial, sans-serfi;
    color: #333399;
}
#secondary-content {
    position: absolute;
    top: 185px;
    left: 230px;
}
.subsec {
    font: bold 15px Verdana, helvetica, Arial, sans-serif;
    color: #333366;
}
.idTabs li {
    list-style: none;
}
.idTabs li a{
    text-decoration: none;
    color: 6666FF;
    font-family: Arial, Verdana, sans-serif;
    font-size: 12px;
}
#footer {
    background-color:#336699;
    position: absolute;
    left: 200px;
    top: 650px;
    height: 20px;
    width: 75%;
    color: #FFFFFF;
    font: 11px;
}
#about-board {
    display: none;
}
#about-bylaws {
    display: none;
}
#about-contact {
    display: none;
}
</style>

<title>Overseas Hong Kong Association</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body background = "graphics/news_bkgrd.jpg">
    <div id="container">
        <div id="header">
            <div id = "logo">
                <img src="graphics/top_new.jpg" width="640" height="109">
            </div>
        <div id="navigation">
            <ul>
                <li class="active"><a href="index-new.html">Home</a></li>
                <li><a href="about-new.html">About OHKA</a></li>
                <li><a href="events-new.html">Events</a></li>
                <li><a href="gallery.html">Gallery</a></li>
                <li><a href="membership-new.html">Join OHKA</a></li>
            </ul>
        </div>
        </div>
        <div id="content">
            <div id="primary-content" class="pc">
                <h1 class="heading">About OHKA</h1>
                    <div id="about-main">
                        <h2 class="title">Who We Are</h2>
                        <p>We are dedicated to being a premier association in Central New Jersey which provides a gathering place for social, recreational, and business
                          activities for members and their families in a distinctive Asian    atmosphere.</p>
                          <p>In achieving our mission, we will:</p>
                        <ul>
                        <li><i>Maintain a commitment to an Asian identity</i></li>
                        <li><i>Maintain an association environment which is open and hospitable</i></li>
                        <li><i>Maintain a fiscal responsibility</i></li>
                        <li><i>Project a positive image within our community</i></li>
                        <li><i>Be responsive to our members</i></li>
                        </ul>
                    </div>
                    <div id="about-board">
                        <h2 class="title">OHKA Board for the term of 2008-2010</h2>
                        <p><strong>President</strong><br>Josephine Yan<a href="mailto:%20jyan168@yahoo.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                        <p><strong>Vice President</strong><br>Clement Kwok<a href="mailto:%20clemk321@yahoo.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                        <p><strong>Secretary</strong><br>Tina Choy<a href="mailto:%20tina_ronny@hotmail.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                        <p><strong>Treasurer</strong><br>Pius Chu<a href="mailto:%20pius.chu@gmail.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                        <p><strong>Program Director</strong><br>Frank Lau<a href="mailto:%20frankcmlau@aol.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                        <p><strong>Public Affairs</strong><br>Lily Chu<a href="mailto:%20lilchu888@gmail.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a>
                        <br>Nelson Yan<a href="mailto:%20nyan3388@yahoo.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                        <p><strong>Youth & Charity Director</strong><br>Lezlee Ho<a href="mailto:%20lezlee29@yahoo.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                        <p><strong>Art Director</strong><br>Betty Yeung<a href="mailto:%20betty.yeung@ausomecandy.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                    </div>
                    <div id="about-bylaws">
                        <h2 class="title">By-Laws</h2>
                        <p>Click <a href="new laws.html"><b>here</a></b> to view the by-laws of the Overseas Hong Kong Association.
                    </div>
                    <div id="about-contact">
                        <h2 class="title">Contact Us</h2>
                          <div align="center">Overseas Hong Kong Association (OHKA)</div>
                          <div align="center">P.O. Box 254</div>
                          <div align="center">3124 Highway 27</div>
                          <div align="center">Franklin Park, NJ 08823</div>
                      <p>    If you have any questions regarding OHKA, please contact us at
                      <a href="mailto:ohka.email@yahoo.com">ohka.email@yahoo.com</a>.</p>
                    </div>
            </div>
            <div id="secondary-content" class="sc">
                <h3 class="subsec">More Links</h3>
                <ul class="idTabs" id="sub">
                <li><a href="about-new.html"#about-main>Who We Are</a></li>
                <li><a href="about-new.html"#about-board>Our Board</a></li>
                <li><a href="about-new.hmtl"#about-bylaws>By-Laws</a></li>
                <li><a href="about-new.html"#about-contact>Contact Us</a></li>
                </ul>
                <img src="graphics/boat.jpg" style="margin:50px 0 0 40px;">
            </div>
        </div>   

    <div id="footer">
      <div align="center">Copyright &copy;2001 Overseas Hong Kong
        Association. All rights reserved.</div>
       </div>
    </div>
</body>
</html>

Re: submenu links not working

Could you load this up somewhere and give us a link?

Re: submenu links not working

it is loaded, try www.ohka.org/index-new.html and then click about OHKA menu and there are submenus on the left hand side, the three links below Who We Are are not working

Re: submenu links not working

Where is your doctype?  (Use HTML 4.01 strict)

<ul class="idTabs" id="sub">
                <li><a href="about-new.html"#about-main>Who We Are</a></li>
                <li><a href="about-new.html"#about-board>Our Board</a></li>
                <li><a href="about-new.hmtl"#about-bylaws>By-Laws</a></li> (Note the typo)
                <li><a href="about-new.html"#about-contact>Contact Us</a></li>
                </ul>

What are you trying to achieve with the green parts?

The links actually work for me (minus the one with the typo), but they lead to the page you're already on, so nothing changes.

Re: submenu links not working

i have these contents hidden for the green parts in the css code because if they are not, the page you are on, shows all this contents underneath each other.
#about-board {
    display: none;
}
#about-bylaws {
    display: none;
}
#about-contact {
    display: none;
}
When you click on the links, it's suppose to bring up other content.
See primary content in the html with the nested divs below -

       <div id="content">
            <div id="primary-content" class="pc">
                <h1 class="heading">About OHKA</h1>
                    <div id="about-main">
                        <h2 class="title">Who We Are</h2>
                        <p>We are dedicated to being a premier association in Central New Jersey which provides a gathering place for social, recreational, and business
                          activities for members and their families in a distinctive Asian    atmosphere.</p>
                          <p>In achieving our mission, we will:</p>
                        <ul>
                        <li><i>Maintain a commitment to an Asian identity</i></li>
                        <li><i>Maintain an association environment which is open and hospitable</i></li>
                        <li><i>Maintain a fiscal responsibility</i></li>
                        <li><i>Project a positive image within our community</i></li>
                        <li><i>Be responsive to our members</i></li>
                        </ul>
                    </div>
                    <div id="about-board">
                        <h2 class="title">OHKA Board for the term of 2008-2010</h2>
                        <p><strong>President</strong><br>Josephine Yan<a href="mailto:%20jyan168@yahoo.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                        <p><strong>Vice President</strong><br>Clement Kwok<a href="mailto:%20clemk321@yahoo.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                        <p><strong>Secretary</strong><br>Tina Choy<a href="mailto:%20tina_ronny@hotmail.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                        <p><strong>Treasurer</strong><br>Pius Chu<a href="mailto:%20pius.chu@gmail.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                        <p><strong>Program Director</strong><br>Frank Lau<a href="mailto:%20frankcmlau@aol.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                        <p><strong>Public Affairs</strong><br>Lily Chu<a href="mailto:%20lilchu888@gmail.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a>
                        <br>Nelson Yan<a href="mailto:%20nyan3388@yahoo.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                        <p><strong>Youth & Charity Director</strong><br>Lezlee Ho<a href="mailto:%20lezlee29@yahoo.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                        <p><strong>Art Director</strong><br>Betty Yeung<a href="mailto:%20betty.yeung@ausomecandy.com"><img border="0" src="graphics/mail.gif" width="28" height="22"></a></p>
                    </div>
                    <div id="about-bylaws">
                        <h2 class="title">By-Laws</h2>
                        <p>Click <a href="new laws.html"><b>here</a></b> to view the by-laws of the Overseas Hong Kong Association.
                    </div>
                    <div id="about-contact">
                        <h2 class="title">Contact Us</h2>
                          <div align="center">Overseas Hong Kong Association (OHKA)</div>
                          <div align="center">P.O. Box 254</div>
                          <div align="center">3124 Highway 27</div>
                          <div align="center">Franklin Park, NJ 08823</div>
                      <p>    If you have any questions regarding OHKA, please contact us at
                      <a href="mailto:ohka.email@yahoo.com">ohka.email@yahoo.com</a>.</p>
                    </div>
            </div>

Re: submenu links not working

There still is no doctype.

And I'm still not clear what

<li><a href="about-new.html"#about-board>Our Board</a></li>

is supposed to be.  The '#' is generally used in your html as a bookmark --- or in your CSS as an ID.  What you have there, makes no sense to me -never seen anything like it before.

If you have a bookmark on a page and want to go to it, then you'd have to write the link like this:

<li><a href="about-new.html#about-board">Our Board</a></li>

If you want a special style for this part, then it need to look htis way:

<li><a href="about-new.html" id="about-board">Our Board</a></li> -- and your CSS

#about-board {what: ever;}

And the CSS you have there - display: none - means DO NOT display, so I"m not sure how clicking is supposed to not not-display.

Are you trying something frame-like here, where you want to just change a certain part of a page?

BTW
- there should NOT be a space between mailto: and the email address.
-

Re: submenu links not working

We have an older files on our website now.  I am trying to re-design it using css as it shows much better.
I have never seen a doctype in any of the files.

I had seen some code like this from another website:  but they were using a .php file instead of html.
<li><a href="about-new.html#about-board">Our Board</a></li>

In the css I have display: none because the page I want to show is the first content and when I click on Our Board, the second link I want another content to show, otherwise they all show and that's not what I want.

So in the css:
#about-board {what: ever;}

after a display:none, how do I get it to display or how do I hide it until the link is clicked?

The mailto: has a space because it only show icon and we need space there.

Re: submenu links not working

Just because there is no doctype on that site now does not mean that a doctype isn't part of a properly coded webpage.

<a href="about-new.html#about-board"> --- is a link to a bookmark (a specific place inside a page).  It has nothing to do with CSS (or PHP) -- and it's not what you have on your site right now.  You have the #about-board OUTSIDE the quotes.

You could set the display none as the default, and then use a hover or link CSS to display - but that's really not how websites work - at least none of the ones I've ever studied.

What's wrong with just creating a new page for the new content?

Re: submenu links not working

tchoy wrote:

The mailto: has a space because it only show icon and we need space there.

I'm talking about

<a href="mailto:%20clemk321@yahoo.com">

the %20 indicates a space, and there should not be one.

Re: submenu links not working

creating a page for new content would just create more files.
i believe that the code i was using, they may be using a .js in conjunction with that.

If you go to http://www.stevens.edu/csa and then go to about csa, it has those links on the side and when you click on them, it brings up other content, but in the url, does not show the #.  Look at their code through view source and you will see what I am talking about.

Re: submenu links not working

It looks like the JavaScript is what runs this thing - just keep in mind if someone has JavaScript turned off, it won't work.  And --- there's nothing wrong with one file for each page - that's how websites work.