bottom 20 px from "canvas" NOT screen - possible ?

Reply

Join Date: Nov 2008
Posts: 2
Reputation: AndyTT75 is an unknown quantity at this point 
Solved Threads: 0
AndyTT75 AndyTT75 is offline Offline
Newbie Poster

bottom 20 px from "canvas" NOT screen - possible ?

 
0
  #1
Nov 14th, 2008
Hello to all

Can anyone help me ?

I'd like to create a box whose bottom is always 20 px from the bottom of the "canvas" (=the total area rendered by the browser).

This is straightforward when the height of the canvas is less than the screen height

But tricky when the canvas is taller than the screen-height.

Is this possible with CSS ? If so, how ?

Thanks for help !
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 596
Reputation: buddylee17 has a spectacular aura about buddylee17 has a spectacular aura about 
Solved Threads: 125
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Pro

Re: bottom 20 px from "canvas" NOT screen - possible ?

 
0
  #2
Nov 14th, 2008
Yes. Use absolute positioning and set bottom attribute to 20px.
  1. position:absolute;
  2. bottom:20px;
Lost time is never found again.
- Benjamin Franklin
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 2
Reputation: AndyTT75 is an unknown quantity at this point 
Solved Threads: 0
AndyTT75 AndyTT75 is offline Offline
Newbie Poster

Re: bottom 20 px from "canvas" NOT screen - possible ?

 
0
  #3
Nov 16th, 2008
In fact, that was my first appraoch - but it doesnt work
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 596
Reputation: buddylee17 has a spectacular aura about buddylee17 has a spectacular aura about 
Solved Threads: 125
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Pro

Re: bottom 20 px from "canvas" NOT screen - possible ?

 
0
  #4
Nov 16th, 2008
Validate the page with the W3C. You could have an open element or an error causing this to not work.

Just to see what it should do, create a blank html page and put only the following into the body of the document:
  1. <div style="position:absolute; bottom:40px">
  2. This div should be 40px from the bottom.
  3. </div>
  4. <div style="position:absolute; bottom:20px">
  5. This div should be 20px from the bottom.
  6. </div>
  7. <div style="position:absolute; bottom:0">
  8. This div should be at the bottom of the page.
  9. </div>
Lost time is never found again.
- Benjamin Franklin
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



Tag cloud for HTML and CSS
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC