Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Senior Member Andrew Yurlov's Avatar
    Join Date
    Apr 2011
    Location
    Portland, OR
    Posts
    1,306
    Member #
    27566
    Liked
    181 times
    Whenever I try to make the container width 100% it ALWAYS leaves some space on all sides. Why does it do this and how can I fix it.

    Heres the exact css code:

    #container{
    width: 100%;
    height: 1000px;
    margin: 0px auto 0px auto;
    border: 1px solid black;
    }

    Help please?
    Artificial intelligence is nothing compared to natural stupidity -Someone

    Design is a funny word. Some people think design means how it looks.
    But of course, if you dig deeper, itís really how it works.
    -Steve Jobs



  2.  

  3. #2
    Junior Member Keith Cancel's Avatar
    Join Date
    Sep 2011
    Posts
    13
    Member #
    29396
    Liked
    1 times
    what do mean by space on the sides like padding?

  4. #3
    WDF Staff m3n0tu18's Avatar
    Join Date
    Jul 2011
    Location
    Devon, UK
    Posts
    1,473
    Member #
    28473
    Liked
    265 times
    in the body tag add this code

    Code:
    body{margin:0;padding:0;}
    Ronald Roe and Andrew Yurlov like this.
    If you like my comments to your thread please click the LIKE button

    Check out my portfolio: Here!
    View my company Facebook Page
    View my company Website

    <<Plrease ignoer my typo's I have isdexlyia>>

  5. #4
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Yup, all browsers try to interpret a margin for the body automatically. By using the body to margin:0; padding:0; , you are effectively canceling out all the browser differences.

    I've read on this form that it is called a "reset"

  6. #5
    Senior Member Andrew Yurlov's Avatar
    Join Date
    Apr 2011
    Location
    Portland, OR
    Posts
    1,306
    Member #
    27566
    Liked
    181 times
    Quote Originally Posted by m3n0tu18, post: 220063
    in the body tag add this code

    Code:
    body{margin:0;padding:0;}
    Cool it worked. Thanks (:
    m3n0tu18 likes this.
    Artificial intelligence is nothing compared to natural stupidity -Someone

    Design is a funny word. Some people think design means how it looks.
    But of course, if you dig deeper, itís really how it works.
    -Steve Jobs



  7. #6
    Junior Member
    Join Date
    Aug 2011
    Location
    India
    Posts
    8
    Member #
    28761
    body{margin:0;padding:0;}

  8. #7
    WDF Staff m3n0tu18's Avatar
    Join Date
    Jul 2011
    Location
    Devon, UK
    Posts
    1,473
    Member #
    28473
    Liked
    265 times
    Quote Originally Posted by amitweb, post: 220570
    body{margin:0;padding:0;}
    @Amitweb please read the thread before commenting. You will find I had already resolved the issue.
    If you like my comments to your thread please click the LIKE button

    Check out my portfolio: Here!
    View my company Facebook Page
    View my company Website

    <<Plrease ignoer my typo's I have isdexlyia>>


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:35 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com