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 7087333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:39:41+00:00 2026-05-28T07:39:41+00:00

I have the following HTML code with CSS: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0

  • 0

I have the following HTML code with CSS:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <style type="text/css">
        div.scroll
        {
            background-color:#00FFFF;
            position:absolute;
            top:0%;
            left:0%;
            width:10%;
            height:100%;
        }

        div.hidden 
        {
            background-color:#00FF00;
            position:absolute;
            top:0%;
            left:50%;
            width:20%;
            height:100%;
        }

        div.menu
        {
            position:absolute;
            top:70%;
            left:20%;
            width:80%;
        }
    </style>
</head>

<body>
    <p>The overflow property specifies what to do if the content of an element exceeds the size of the element's box.</p>

    <div class="menu">
        <div class="scroll">Scroll: You can use the overflow property when you want to have better control of the layout. The default value is visible.</div>
        <div class="hidden">Hidden: You can use the overflow property when you want to have better control of the layout. The default value is visible.</div>
    </div>
</body>

As you can see I want two of the divisions to have color – they don’t and I can’t figure out why. The file has an html extension and I have used both IE7 and FF 3.0.3 to test.

What perplexes me the most is that it is almost a verbatim copy of an example from W3C schools that does show color! Link to example: W3C example.

  • 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-28T07:39:42+00:00Added an answer on May 28, 2026 at 7:39 am

    The problem is height:100%; . It means that the element use all the height of its parent, in this case the <div class="menu">, which is 0px because all its content is positioned with absolute.

    You can either remove it if you want each div of have the size of its text, or set a height in pixel if you want to apply the same height to the both divs.

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

Sidebar

Related Questions

I have the following code: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html
hi i have following code <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html
I have the following code: <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd> <html
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html xmlns=http://www.w3.org/1999/xhtml dir=ltr> <head> <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js
I have the following code. <?xml version=1.0 encoding=UTF-8 standalone=no?> <!DOCTYPE html PUBLIC -//W3C//DTD XHTML
I have the following HTML code: <?xml version=1.0 encoding=utf-8 ?> <!DOCTYPE html PUBLIC -//W3C//DTD
i have the following div in my website: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
I have the following html/css code . When I have the screen resolution to
I have the following code <html> <head> <title>Test</title> <style type=text/css> <!-- body,td,th { color:
I have the following html code <!DOCTYPE html> <html lang=en> <head> <meta name=viewport content=width=device-width;

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.