CSS position fixed some ; i want it to be at absolute bottom and body to be just above it


You want to put the fixed div at the bottom and specify 95% for the top, like so:

    <div id="content-box">
        <div id="fixed">
    Login Login


Add css info for the content div so it looks something like this:

#fixed {

#content-box {
padding-bottom: 20em;

Give bottom padding to the body equal to the height of the div.


but you also have to change in your code the top: 95%; to bottom:0; in the #fixed rule, because the height is not known so the remaining 5% might be less than the 2em height of the div (it causes the div to move outside of the body ..).

demo at http://jsfiddle.net/gaby/cvxtk/1/

Tags: Html / Css / Drupal

Similar questions

How to position an element using jQuery UI .position method?
I'm going on about 20 hours trying to get jQuery UI to work, and fortunately, I'm still not frustrated. I just really want it to work. I would like to use the .position method to position an element in the top right corner relative to #page, (http://api.jqueryui.com/position/). I'm not sure which version of jQuery this method requires, so I'm using...
Want to display the validation error message above the webform
I have a webform created in Drupal 8 using the webform module I have to submit the data to 2 different 3rd party API. The scenario is I have to submit the data to the 1st API if there is no error response found then submit the data to 2nd API so now I have created a submit handler and attached the handler to the webform. Now the issue is when I got...
How to add region just above title for omega theme?
How to add region just above title for omega theme? I try to add a region just above title. But no sccessful.
absolute url of inline images in body using views and services
I am using services module in Drupal 8 to output node body in JSON format. The inline images are broken in android app which uses json to render node. Is there any code/method or module for D8 which can rewrite relative inline images path to absolute. My drupal version is 8.0.5
Load CSS and JS using absolute paths on select pages
I've got a page (menu callback) which serves as a template for an external service. As the HTML of the page is consumed by the external service and rewritten then served from their server, all the CSS and JS paths must be absolute. Elsewhere on my site I use relative paths via AdvAgg, but here I need to rewrite all the link elements to be of the ty...
How to load absolute CSS and JS assets
I would like to load CSS and JS from https://static.example.com . The typical page contains: and contains similar entries for JS. I would like to add https://static.example.com to the front of the href="URL" for both CSS and JS. I'm am aware that this can be done with a contrib module. I would like to find a hook or some other way to add this to my...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.