css3 - CSS lower-right position dependant on the page height -


see http://jsfiddle.net/2a3xz/ issue i'm facing. image should on lowest right corner after scrolling, not in lowest right corner of viewport first drawn.

using

.someclass {     position: relative; }  .image {     position: absolute;     bottom: 0px;     right: 0px; } 

and containing divs inside each other not work reason (the entire image disappears). missing here?

used position: fixed; instead of position: absolute;. here fiddle showing this: http://jsfiddle.net/vbv3p/

edit: after op's comment:

you should able apply position: relative; body. please see following:

html:

<body> <div class="corner">     <img src="http://wtactics.org/wiki/images/2/2b/box.png" /> </div>this <br>is <br>the <br>site <br>content <br>which <br>will <br>cause <br>the <br>page <br>to <br>scroll <br>vertically <br>because <br>of <br>its <br>amount <br>of <br>lines. <br>that <br>is <br>expected <br>behaviour <br>and <br>working <br>as <br>is <br>should <br>be. <br>however, <br>the <br>box <br>on <br>the <br>lower <br>right <br>corner <br>should <br>be <br>at <br>the <br>current <br>page's <br>lowest <br>corner <br>depending <br>the <br>page's <br>height, <br>not <br>just <br>in <br>the <br>corner <br>of <br>the <br>first <br>drawn <br>viewport. <br> </body> 

css:

body {     position: relative; } .corner {     position: absolute;     bottom: 0px;     right: 0px; } 

here updated fiddle: http://jsfiddle.net/kew4p/


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -