#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    38
    Rep Power
    2

    Margin even if body margin set to zero


    Hello. I am developing an iphone app and have placed 2 divs on the page, side by side, each set at 50% width. The margin-left/right, etc. are all set to 0px for the body. When I view the page there is space at the top and left pushing the divs so I have to drag to see the bottom right corner. What can I be doing wrong. I do not want a margin, so that the divs can reach the top and side of the screen.

    Also, I am sure this is a related example. I have an image set as the page background and a bit of the bottom and right of the image extends beyond the screen and not visible.
    background-image:url('/photo/main.jpg');
    background-size: cover;


    This is what I have tried...

    Set margin-left: 0px; (right/top/bottom) to body {}

    Set padding-left: 0px; (right/top/bottom) to body {} and #page {}

    I appreciate any help!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    194
    Rep Power
    77
    add the following to the very top of your css
    Code:
    * {
      margin: 0;
      padding: 0;
    }

IMN logo majestic logo threadwatch logo seochat tools logo