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

  • Home
  • SEARCH
  • 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 548423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:04:38+00:00 2026-05-13T11:04:38+00:00

Please refer the below code. I want the boxes for Blue and all other

  • 0

Please refer the below code. I want the boxes for Blue and all other color to be stretched. I mean it should start and end with the border of Styles and Colors.

Thanks

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <title>Component5 colors</title>

        <style type="text/css">
            .theoneclicked {
                background-color:#b0c4de;
            }
            ul {
                display: block;
                list-style: none;               
            }
            ul#nav_top {
                width:100px;
                border: 1px solid black;
            }
            li#nav_top1, li#colors {
                width:100px;
                border: 1px solid black;        
                display: block;

            }

             li#nav_mid1 {
                border: 1px solid black;

             }
            a {
                text-decoration:none;
            }

        </style>
    </head>
    <body>
        <ul id="nav_top">
            <li id="nav_top1"><span class="heading"><a href="comp5.html">Styles</a></span></li>
            <li id="colors"><span class="theoneclicked"><a href="colors.html">Colors</a></span></li>
                <ul id="nav_mid">
                    <li id="nav_mid1">
                        Blue                        
                    </li>
                    <li id="nav_mid1"> Orange</li>
                    <li id="nav_mid1">Green</li>
                </ul>
            <li id="images"><span class="nav">Images</span></li>
        </ul>

    </body>
</html>
  • 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-13T11:04:38+00:00Added an answer on May 13, 2026 at 11:04 am

    For starters, your HTML is invalid. A nested ul element should be contained within an li. Also, you can’t repeat nav_mid1 as an ID. You’ll need to use a class for multiple elements.

    Changing the markup and CSS to something the following solves your problem. Notice I’m adding some padding to the left of the nested UL as it’s obviously a subgroup of ‘Colors’.

    <ul id="nav_top">
                <li id="nav_top1"><span class="heading"><a href="comp5.html">Styles</a></span></li>
                <li id="colors"><span class="theoneclicked"><a href="colors.html">Colors</a></span></li>
        <li>
                    <ul id="nav_mid">
                        <li class="nav_mid1">
                            Blue                        
                        </li>
                        <li class="nav_mid1"> Orange</li>
                        <li class="nav_mid1 last">Green</li>
                    </ul>
    </li>
                <li id="images"><span class="nav">Images</span></li>
            </ul>
    

    CSS

                ul#nav_top {
                    width: 100px;
                    display: block;
                    list-style: none;               
                }
                ul ul {
    padding-left: 10px;}
                ul#nav_top li {
    
                    border: 1px solid black;
                }
                li#nav_top1, li#colors {
    
                    display: block;
    
                }
    
                 ul#nav_mid li {
                   border-width: 0 0 1px 0;
    
    
                 }
    #nav_mid li.last {
        border-bottom: none;
    }
                a {
                    text-decoration:none;
                }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 262k
  • Answers 262k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Here's some code to get you started; I show how… May 13, 2026 at 11:50 am
  • Editorial Team
    Editorial Team added an answer A WrapPanel might be one possible choice. This will avoid… May 13, 2026 at 11:50 am
  • Editorial Team
    Editorial Team added an answer I found a way to do it. What you have… May 13, 2026 at 11:50 am

Related Questions

I have an abstract user control(baseModule) that has a property that I plan on
I am re-creating a part of my company’s database because it does not meet
In the below code, i am trying to reference an external .dll, which creates
I am using MSMQ as a way to provide asynchronous SOA. Please refer to
I have a parent thread (non-UI) which creates some child threads to do some

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.