CSS - White space around top and left of page

dwinnbrown

I'm building a web app and unfortunately I have a white border around the top and left of the page. I have set the html and body padding and margin to 0px but it doesn't seem to be having any effect on it. Inside of the body is a single iframe and when I preview the site and I go on inspect element it shows that the padding is on the body...

Here is the code - if anyone could take a look that would be great!

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge" />
    <title>index</title>
    <style>
        html {
            height:100%;
        }
        body {
            background-color: #FFFFFF;
            margin: 0px !important;
            padding: 0px !important;
            height:100%;
        }

    </style>

    <!-- copy these lines to your document head: -->

    <meta name="viewport" content="user-scalable=yes, width=320" />

    <!-- end copy -->

  </head>
  <body>

    <!-- copy these lines to your document: -->

    <div id="index_hype_container" style="margin:auto;position:relative;width:100%;height:100%;overflow:hidden;" aria-live="polite">
        <script type="text/javascript" charset="utf-8" src="index.hyperesources/index_hype_generated_script.js?4823"></script>
    </div>

    <!-- end copy -->


  </body>
</html>

JSFiddle

joe_young

Try setting the margins of the #my-iframe to a negative number, e.g. -10px:

#my-iframe {
    width: 100vw;
    height: 100vh;
    border: 0;
    padding: 0;
    margin: -10px;
}

This may cut a small section of the iframed site off, but judging by the look of the site a few pixels off the edge won't do much damage.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

White space at top of page

From Dev

CSS White Space At Bottom of Page

From Dev

Extra white space at the top of my page

From Dev

Extra white space at the top of my page

From Dev

How to remove white space at the top of page

From Dev

Extra White Space on Right Page CSS/HTML

From Dev

white space in the left of the website

From Dev

How to prevent white space "bounce" after scrolling to the top of the page and the bottom

From Dev

HTML/CSS float left automatically fill white space

From Dev

CSS Apply white space left and right of the table content

From Dev

HTML/CSS float left automatically fill white space

From Dev

Removing white space around the divs

From Dev

White Space around repeating image

From Dev

Responsive CSS floats to align vertically without any white space on top

From Dev

White space on right of page

From Dev

how to remove white space on the top

From Dev

White space on top of my webpage

From Dev

HTML: white space around elements, how to remove?

From Dev

Unwanted white space around image inside div

From Dev

White Space Around Images in Bootstrap IMG Gallery

From Dev

white space around svg icon on web

From Dev

How to remove left and right white space from the default home page on opencart?

From Dev

How do I get rid of the white space at the top of my web page?

From Dev

White space/ bar at the bottom of the page

From Dev

TCPDF - White space at bottom of page

From Dev

White space on right of page - mysterious

From Dev

Unwanted white space at the bottom of page

From Dev

Excess white space, page width

From Dev

Need a CSS solution to stay top left with page scrolling (not position:fixed)

Related Related

HotTag

Archive