Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Margin not working only in Safari (element is at the bottom of the page)

Tags:

html

css

safari

Please check the following link in the latest safari: http://www.grupoguion.com/

The footer is fixed at the bottom and supossed to revealed with the scrolling, so the previous section has a margin-bottom but it doesn't work, only in Safari. Everywhere else is ok, even in I.E. I tried to add overflow: auto in the page-wrapper, but everything gets weird in all browsers with elements dissapear and appear. I also have read that removing height: 100% in the body and html may fix that, but that is not an option for me, because i need the images to fix the browser height.

Does anybody have another possible solution please?

Thank in advance.

like image 760
Jose Rojas Avatar asked May 25 '15 04:05

Jose Rojas


People also ask

Why margin bottom is not working?

Why margin-bottom doesn't work in this case. Margin-bottom takes space between self and its next element Where bottom is not , it is realtive to the viewport. Bottom property works if elements position is other than relative.

Can we set the margins for an element?

The CSS margin properties are used to create space around elements, outside of any defined borders. With CSS, you have full control over the margins. There are properties for setting the margin for each side of an element (top, right, bottom, and left).


1 Answers

You can add a div with the size of your bottom and make it transparent. html:

<div id='tr-footer'>
</div>

css :

#tr-footer{
height: ?px;
width:100%;
background:transparent;
}
like image 152
Antoine Pointeau Avatar answered Oct 13 '22 04:10

Antoine Pointeau