Search code examples
cssheightpositioningresolution

Define the height of div box (bottom) vs different resolutions


I have a problem with setting the appropriate text to the slider. I want the text to appear on the bottom right of the page. Only problem is the different resolutions (tablet, laptop, 24'' monitor).

Testing page: http://tinyurl.com/d825kuv

code:

div {
 position:relative; 
 float:right; 
 vertical-align: bottom;
}

Solution

  • Do:

    position:absolute;
    right:0px;
    bottom:0px;
    

    This will make sure that the element in question will be as far right, and as far down within the parent as possible. Of course if you wanted to pad it from the right/bottom just take the pixels up a notch. Note that position:absolute only works if the parent's position is not set as default. If in doubt give your parent the following style:

    position:relative;