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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:36:57+00:00 2026-06-18T03:36:57+00:00

Possible Duplicate: Get a div to go across the whole page I need to

  • 0

Possible Duplicate:
Get a div to go across the whole page

I need to make a div tag that will start from the beginning of the browser, not after a margin, for example when I make this code:

<html>
<head>
<title>CSS Test</title>
<style type="text/css">
div
{
width:100%;
height:100%;
border:1px solid black;
}
</style>
</head>
<body>
<div>
</div>
</body>
</html>

The div starts after a margin from top, left and right. But I want it to start with no margin, even when I make the margin:0px 0px; it still won’t work. So, what do I do to make it with no margins and is that method useable with images too?

  • 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-18T03:36:58+00:00Added an answer on June 18, 2026 at 3:36 am
    html, body {
        margin: 0;
        padding: 0;
    }
    div {
        margin: 0;
        border: 1px solid black;
        width: 100%;
        height: 100%;
        box-sizing:border-box;
        -moz-box-sizing:border-box;
        -webkit-box-sizing:border-box;
    }
    

    Without the box-sizing you will end up with a div which is 100%+2px wide and 100%+2px tall.

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

Sidebar

Related Questions

Possible Duplicate: Get all files from VSS for a given date? I need to
Possible Duplicate: CSS - percentage height I can't get the middle div of 3
Possible Duplicate: Get file name from URI string in C# How to extract file
Possible Duplicate: Get URL of ASP.Net Page in code-behind I'm trying to hold current
Possible Duplicate: Get URL from background-image Property I'm using the Cycle Plugin and i
Possible Duplicate: Get the id of a the item that is clicked I have
Possible Duplicate: CSS to make HTML page footer stay at bottom of the page
Possible Duplicate: Get attribute values as array from selection of elements using jQuery I
Possible Duplicate: Best way to center a <div> on a page vertically and horizontally?
Possible Duplicate: jQuery get mouse position within an element I have a page and

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.