Unwanted 1px space in Internet Explorer

Asked

Viewed 205 times

2

On my website, below the footer is a space of 1px that only occurs in Internet Explorer.
In my case, I’m using the IE-10. The footer has fixed positioning, I inserted it outside the container of the site, and put it back setting a negative lower margin to container.

.MASTER {
    width:1169px;
    margin-left: auto;
    margin-right: auto;
    /*margin-bottom:-228px;*/
    min-height: 100%;
    height: auto !important;
    height: 100%;
    margin: 0 auto -228px;
}
.MT_SEM_SOMBRAS {
    width:1155px;
    margin-left:auto;
    margin-right:auto;
}
#fixer {
    width:1155px;
    height:228px;
    margin-left:auto;
    margin-right:auto;
    background-color:#FF0;
}
#push {
    margin-left:auto;
    margin-right:auto;
    width:1155px;
    height:228px;
}
<div id="MASTER">
    <div id="MT_SEM_SOMBRAS">
        Conteúdo do site
    </div>
</div>

<div id="fixer"> <!--este na verdade é o rodapé-->
    conteúdo com margem negativa
</div> 

  • I want to remove this unwanted space in ie. In Dreamweaver, it also does not appear

  • I could not reproduce the problem, could provide an example in jsfiddle?

  • I believe jsfiddle wouldn’t reproduce the problem, since it only occurs in internet explorer.

  • I’m using the Sticky footer technique.

  • @Harison jsfiddle is not a browser, it is an environment for you to reproduce your problem, so you send us the link and then we will open in Internetexplorer.

  • http://hfoliveira.com.br/MAQUES/TESTE_RODAPE.html

  • The negative margin is still there ?

  • Still remains.

  • Tried to make a clear:?

  • The question lacks information. Impossible to reproduce.

  • question under discussion at meta http://meta.pt.stackoverflow.com/questions/4488/usu%C3%A1rio-com-multiplas-questions-similar

Show 6 more comments

2 answers

5

You can use CSS Hack for this, example:

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { 
   // apenas IE 10
   // aqui tu coloca a classe com a margin negativo pro IE
}

0

Add to CSS

body{
        margin:0 0 0 0;
        padding: 0 0 0 0;
    }

This code aims to reinforce that we do not want space between body and content.

Example.:

<html>
    <head>
        <meta charset="iso-8859-1">
        <title>Documento sem título</title>
        <style>
            body{
                margin:0 0 0 0;
                padding: 0 0 0 0;
            }
            #MASTER {
                width:1169px;
                height: 100%;
            }
            #MT_SEM_SOMBRAS {
                width:1155px;
                margin-left:auto;
                margin-right:auto;
                height:100%;
            }
            #fixer {
                clear:both;
                width:1155px;
                height:228px;
                margin-left:auto;
                margin-right:auto;
                background-color:#FF0;
            }
        </style>
    </head>

    <body>
        <div id="MASTER">
            <div id="MT_SEM_SOMBRAS">
                Conteúdo do site

            </div>

        </div>
        <div id="fixer"> <!--este na verdade é o rodapé-->
                conteúdo com margem negativa
        </div> 

    </body>
</html>
  • 2

    It would be nice if you could explain why this code works or what the purpose is. :)

  • Didn’t work...

  • Maybe I didn’t quite understand the embarrassment. What I realized was that between the footer and the bottom of the body there was 1px blank in iexplorer 10

  • That’s right @Tiagogomes, managed to visualize the problem?

  • I edited the answer to put html. With this code you still have 1px between footer and body?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.