Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hello,
I have a fav.css file with class .favBg
CSS
-------------
.favBg
{
border: 0px;
padding: 0px;
margin: 0px;
width: 100%;
position: absolute;
background-color: #000000;
opacity: 0.5;
filter: Alpha(opacity:50);
}Here i have made a javascript that calculates both window height and scroll height, and another function which adds both the window height and scroll height, so i got total page height.
javascript
----------
function pHeight()
{
var pHeight = scrollHeight() + windowHeight();
return pHeight;
}what I want to do is to update the height of class .favBg with the value of pHeight(), as each page in the site are of different length. Yes, i'm trying to do 100% page height faded background, Just like in Sitepoint Marketplace's "My Shortlist".
Basically I'm doing a "My Favorites" list just like Sitepoint Marketplace's "My Shortlist".
Help greatly appreciated.

if you read my question throughly you'd understand what i was asking, as it can't be explained any simpler.
anyway i figured out a way to get the result I'm after.
Thanks. :)

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |