Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Positioning footer

Tags:

html

css

Due to my footer HTML tag switching places, I'm having trouble positioning it. As you can see in my IDE I've set my footer to be at the most bottom inside the HTML section. However, once I run my app, it changes position by going 2 lines up.

Is it because of the remodal-pop box configuration? Any idea how to fix this? Here is the image, to make it more understandable.

enter image description here

Here is my css-footer code:

.footer {
     position: absolute;
     right: 0;
     bottom: 0;
     left: 0;
     padding: 1rem;
     text-align: center;
     background: #2E3438;
     color:white;
     height: 23px;
     line-height: 8px;
     font-size: 13px;         
}

and html and body which I can NOT change due to a remodal-pop bug:Twitter Bootstrap modal pushes html content to the left

html {
  overflow: hidden;
  height: 100%;
}
body {
  overflow: auto;
  height: 100%;
}

EDIT (after the given answer): this is the code which you need to change (append to prepend) the name of the file is jquery.remodal.js:

if (!remodal.$overlay.length) {
      remodal.$overlay = $('<div>').addClass(namespace + '-overlay');
      remodal.$body.prepend(remodal.$overlay);
    }

    remodal.$bg = $('.' + namespace + '-bg');
    remodal.$closeButton = $('<a href="#"></a>').addClass(namespace + '-close');
    remodal.$wrapper = $('<div>').addClass(namespace + '-wrapper');
    remodal.$modal = $modal;
    remodal.$modal.addClass(namespace);
    remodal.$modal.css('visibility', 'visible');

    remodal.$modal.prepend(remodal.$closeButton);
    remodal.$wrapper.prepend(remodal.$modal);
    remodal.$body.prepend(remodal.$wrapper);
like image 393
Eugen Sunic Avatar asked Jun 11 '26 00:06

Eugen Sunic


1 Answers

Your remodal js script just appends those div-s on document ready.

Both of them, as I can see at remodal home page are position: fixed so as long as you did not changed styling of those remodal containers - they couldn't shift your absolutely postioned footer.

Probably problem lies elsewhere. You can modify remodal script and prepend (or place elsewhere) those containers but I don't think that would matter.

Maybe there is problem with one of remodal styles? You could remove styles from DOM for test (leaving only js).

like image 110
Przemysław Melnarowicz Avatar answered Jun 13 '26 20:06

Przemysław Melnarowicz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!