Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

CSS to centralise a HTML5 div at the bottom of the screen

CSS to centralise a HTML5 div at the bottom of the screen

Problem

I have the following HTML5 document:

I'm trying to make the Adcontrol appear in the centre at the Bottom of the screen, beneath the canvas. Here's my CSS:

#adControl {   

    float:left; 

    margin: 0px auto;

}

#myCanvas {

    float:left;

}

I've tried various combinations of margin for the adcontrol, but don't seem to be able to centralise it.

Problem courtesy of: pm_2

Solution

Do yo mean something like this?

.box {
    width:1024px;
    margin: 0px auto;
}
#adControl {   
    position:fixed;
    bottom:0;
    width: 728px; 
    height: 90px;
    border: solid 1px red; 
    visibility:visible;
}
Solution courtesy of: enyce12

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

CSS to centralise a HTML5 div at the bottom of the screen

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×