About the bottom positioning problem on the mobile side

Source: Internet
Author: User

The mobile side of the page some of the content is to be fixed at the bottom, generally use fixed, when the page input to the focus of the time,

The bottom of the content will be on the top

If the button is on top, sometimes it doesn't affect the page effect, but when the bottom is a few ads or attention, this time the effect is not.

Solution,:

. mdfmessagebtn{
width:100%;
height:50px;
Background-color: #ffb000;
Color: #fff;
Position:absolute;
bottom:0;
font-size:16px;
}
Html:
<div class= "Usercontainer" style= "position:relative; ">
<button class= "MDFMESSAGEBTN" > Immediate payment </button>
</div>
ls|
Loadbtn (". Usercontainer", ". Mdfmessagebtn");
/* Button Positioning */
function Loadbtn (boot,loat) {
var height=$ (window). Height ();
$ (boot). CSS ("min-height", height);
var uheight=$ (boot). Height ();
if (uheight<=height) {

}else{
$ (loat). css ({"position": "Relative"})
    }
};
Absolute positioning of the button, to its parent relative positioning, get screen height, so that its parent's minimum height is the height of the screen,

About the bottom positioning problem on the mobile side

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.