Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 427233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:33:33+00:00 2026-05-12T19:33:33+00:00

The main structure of the page is like this: <html> <body> <div id=Menu> <h1>Menu</h1>

  • 0

The main structure of the page is like this:

<html>
    <body>
        <div id="Menu">
            <h1>Menu</h1>
            <ul id="MenuList><!-- some LI elements --></ul>
            <h1>Submenu 1</h1>
            <ul id="Submenu1List"><!-- many LI elements --></ul>
            <h1>Submenu 2</h1>
            <ul id="Submenu2List"><!-- many LI elements --></ul>
            <h1>Submenu 3</h1>
            <ul id="Submenu3List"><!-- some more LI elements --></ul>
        </div>
        <div id="Main"><!-- long content --></div>
    </body>
</html>

I use JQuery to make the H1 elements in #Menu clickable so that all the other UL’s are rolled up and the UL after the H1 is rolled down. I would like to scroll #Main indepently of the #Menu and I would like scrollbars, if needed, in each UL in #Menu. Here is the relevant CSS:

    html { height: 100%; overflow: hidden; font-size: .8em; }
    body { height: 100%; overflow: hidden; }
    div#Main { position: absolute; right: 0px; top: 0px; bottom: 0px; width: 79.9%; }
    div#Menu { position: absolute; left: 0px; top: 0px; bottom: 0px; width: 20%; }

    div#Main { overflow: auto; }
    div#Menu h1 { font-size: 1.5em; }
    div#Menu ul { max-height: 87%; overflow: auto; }

This works exactly the way I want it to. The #Main area is scrollable and each UL, when expanded, gets a scroll bar if there is more content than the containing #Menu DIV can contain.

The only problem is that I have to specify a height of 87% of the containing #Menu DIV, which only works for my combination of screen size, window size and font size. Is there a way to achieve the same effect without hard-coding the height of each UL?

If you like, you can see the page. I would post links to the CSS (/musicdb.css) and the JS code (/musicdb.js), but I’m not allowed. If you want to view source, you can switch content types by adding ?mode=xml or ?mode=html to the URL and view it in IE or Firefox.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T19:33:33+00:00Added an answer on May 12, 2026 at 7:33 pm

    I was playing around your site page with Firebug. Can’t really have a really elagant a quick solution for you except for this one:

    Setting the “div#Menu” to 100% and “div#Menu H1” to a height in percentage say 5%.

    You have “menu”, “artists”, “labels” and “formats” = 4 h1 items. That’s 5 X 4 = 20%.

    Set “div#Menu ul” to 100-20 = 80%.

    Play around with the numbers and also adjust the vertical alignment, you should be good to go. The downside is, you will not have nice view in extremely small or large screens.

    My 2 cents.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a website with structure like this: class main { } class mysql
ok so i have code that fundementally has this structure: firstly a main div
My page tree structure looks like this: ROOT - PAGE 1 - PAGE 2
I have my webapplication structured like this: Main page with n links and a
Code first: '''this is main structure of my program''' from twisted.web import http from
Say i have this this structure. MyApp ├── main.py └── package ├── __init__.py ├──
I was trying to create a page like this image. But I'm stuck with
My site currently handles URL's like this... /?p=home /?p=profile&userid=1 /?p=users.online /?p=users.online&page=23 /?p=mail.inbox /?p=mail.inbox&page=12 ...
I have the following page structure: toppage -page1 -page2 -page3 -page4 - (menu separator)
I have a JSF page with some common elements and then 4 parts that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.