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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:37:46+00:00 2026-06-11T12:37:46+00:00

<!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <style> html { margin: 0; padding: 0;

  • 0
<!DOCTYPE html>

<html>
    <head>
        <meta charset="utf-8" />
        <style>
        html {
            margin: 0;
            padding: 0;
            border: 0;
        }

        body, div, span, applet, object, embed, iframe, pre, h1, h2, h3, h4, h5, h6, p, blockquote, a, abbr, acronym, address, big, cite, code, del, dfn, b, strong, em, font, img, ins, kbd, q, s, samp, small, strike, sub, sup, tt, var, table, tbody, dl, dt, dd, ol, ul, li, fieldset, form, button, label, legend, caption, hr, noscript {
            margin: 0;
            padding: 0;
            border: 0;
            outline: none;
            list-style: none;
            font-weight: normal;
            font-style: normal;
            font-size: 100%;
            font-family: inherit;
            vertical-align: top;
            text-decoration: none;
            position: relative;
        }

        body, html {
            height: 100%;
            border: none;
            top: 0;
            font: 12px/1.3 Helvetica, Arial, sans-serif;
            color: #131318;
            background: #E7E7E7;
            text-align: left;
        }

        .full {
            width: 100%;
            float: left;
        }

        .top {
            padding: 20px 0;
            background: #FF0000;
        }

        .center {
            width: 900px;
            margin: 0 auto;
        }

        .shell {
            width: 860px;
            padding: 20px;
            float: left;
            background: #FFF;
        }
        </style>
    </head>
    <body>
        <div class="full top">logo</div>
        <div class="full">
            <div class="center">
                <div class="shell">
                    <p>Lorem</p>
                    <p>Lorem</p>
                    <p>Lorem</p>
                    <p>Lorem</p>
                    <p>Lorem</p>
                    <p>Lorem</p>
                    <p>Lorem</p>
                    <p>Lorem</p>
                    <p>Lorem</p>
                    <p>Lorem</p>
                </div><!--/.shell-->
            </div><!--/.center-->
        </div><!--/.full-->
    </body>
</html>

You can see in here (or by visiting here and shrinking your browser down until there is a horizontal scroll bar, then scrolling to the right) that the top red bar is always the size of the viewport, rather than filling up the entire width of the page. How can I fix this? How can I make a bar like this (my header with menu, etc.) truly fill the width of the page, regardless of view-port resizing (preferably without JavaScript)?

  • 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-11T12:37:47+00:00Added an answer on June 11, 2026 at 12:37 pm

    This has been asked many times. The consensus seems to be to set a min-width on the div.

    min-width: 960px;
    

    Other discussions:

    • 100% width div gets cut off when I scroll right if my browser window is smaller than div’s content
    • scrollbar cutting off div background
    • Footer’s background pattern gets cuttoff when window is resized
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<!doctype html> <html lang=en> <head> <meta charset=utf-8/> <style> form:focus{ background:red; } </style> <title>Home, sweet
The sample page: <!DOCTYPE html> <html> <head> <meta charset=utf-8> <title>Button test</title> <style> * {
My code: <!DOCTYPE html> <html> <head> <title>Demo</title> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <style type=text/css>
my code is: <!DOCTYPE html> <html> <head> <title>Demo</title> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <style
This is my page code: <!DOCTYPE HTML> <html> <head> <meta charset="UTF-8"> <title>Marketing Tracking</title> </head>
Edit: Entire page (HTML) <!doctype html> <html> <head> <meta charset=utf-8 /> <title>jQuery Ajax Test</title>
The code is fully copied below. <!DOCTYPE html> <html> <head> <meta charset=UTF-8 /> <title>Avaliações</title>
<!DOCTYPE html> <html> <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8/> <title>FAQ Section</title> <link rel=stylesheet type=text/css href=styles.css/>
<!DOCTYPE html> <html lang=en> <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8> <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js type=text/javascript></script> <script type=text/javascript>
I have this html and css code: <!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8

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.