Div in body size

0

I have a div that is in my page footer, similar to a footer, the problem is that this div is inside other divs, I wanted it to be the exact size of my body, css. Example:

    
asked by anonymous 23.10.2017 / 16:00

1 answer

1

Yes, in order to have this result since the previous divs interfere with the width of the desired div, you can remove it from the static (normally used) position to absolute and position it. ex:

<style>
div#inner-div{
position: absolute;
width: 100%;
bottom : 0px;
}
<style>

I think I can solve the problem of not being the size of the body, but there are some precautions that you should take into account:

  • If the div you want to put with body size has content above and below, you will get out of the space, and if you want be in the same place as before. areas that have left it, or use position relative
  • Poderas position relative if the parent (selector) has position absolute
  • 23.10.2017 / 16:23