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 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

Related Questions

Please help me to understand below code. This is the script for drag and
I refer to this question: Javascript value to PHP with Jquery I tried with
i try to code a login form which passes username and password to a
Please let me know how to get the value of the first item in
Please suggest me a good method that can be used to write a stream
Please see the Image here http://www.tiikoni.com/tis/view/?id=41d9394 As shown there are two sliders on the
Please, observe the following simple program (based on the example from the protobuf-net project
I'm trying to make a try/catch method to see if a record exist or
I was told that the language generated by the regular expression: (a*b*)* is regular.
I would like to solve the following problem using constraints but i actually don't

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.