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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:31:22+00:00 2026-06-18T06:31:22+00:00

In some websites for example this one, the blue box which shows various options

  • 0

In some websites for example this one, the blue box which shows various options and links such as search, chat, Questions, Tags etc. has its border stretched and fitted to the browser window.

I tried to do so in a web page which i created using div tag but i was unable to make the box stretch and fit to the browser window. Can it be done using div tag? or is there any other way for e.g. CSS?

I do not want to use jQuery or AJAX.

  • 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-06-18T06:31:23+00:00Added an answer on June 18, 2026 at 6:31 am

    Yes DIV’s are prefect for making navigation menus that fill to the edge.

    The most likely problem that you are encountering is the fact that you are making a DIV within another DIV that has rules.

    For example

    CSS

    .container {width:768px;}
    .menu {width:1000px;}
    

    HTML

    <div class="container">
        <div class="menu">
        The Menu Would Go here
        </div>
    </div>
    

    Now as you can see in the above example you have a menu within the container – now because the width of the container is 768px the menu can’t not be 1000px since 768px is the max size set by the first container.

    Now there are several ways around this and by using position:absolute;

    So assuming that you want your menu 100% wide to reach the edges and you want the menu at the top it would look like this in the CSS.

    Lets put this to practice and see what happens so you know what to do from here on wards 😛

    CSS

    .container {min-height:500px;background:#000;width:300px;margin:120px auto;}
    .menu {
      position:absolute; /* Tells Menu to ignore the size and position of container */
      background:#CCC;
      width:100%; /* This tells the the Div to be 100% in Width */
      top:0; /* This sets the menu to the top increase number for distance */
      left:0; /* This sets where it should start from left to right */
      height:100px; /* This sets the height of the menu */
      }
    

    Here is a demo of it in example I just made: http://jsfiddle.net/9j2pa/ play around with it and get used to whats going on.

    Additionally you could always move the MENU out of the container, for example:

    <div class="menu">
    The menu is not contained within the container and width:100% will work.
    </div>
    <div class="container">
    The rest of the site is contained within here
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having issues displaying some websites within iframes. Live example of code This one works.
I saw some websites that (for example): if you want to view your message
I have an example of some code that I see often in websites that
Example: if I want to upload a video to some video service website (such
I'm migrating some websites over to another server. One of the websites is built
Possible Duplicate: Why do some websites add “Slugs” to the end of URLs? This
Many websites, including this one, add what are apparently called slugs - descriptive but
I was wondering if people could post some examples of interesting websites and web
I'm programming some websites with JSP-Scripting and I encounterd a strange problem with urlencoded
Please recommend some websites with a quick guide. MSDN is good but it's hard

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.