Computing.Net > Forums > Web Development > Update DIV height - javascript

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Update DIV height - javascript

Reply to Message Icon

Name: cssExp
Date: June 17, 2007 at 23:26:50 Pacific
OS: Windows Xp
CPU/Ram: Intel Celron D
Comment:

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.



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: June 18, 2007 at 00:29:51 Pacific
Reply:

And aside from the code only working in IE, what's your problem?


0

Response Number 2
Name: cssExp
Date: June 18, 2007 at 02:36:35 Pacific
Reply:

umm what i have so far works on all browsers, i guess you missed my question.


0

Response Number 3
Name: Razor2.3
Date: June 18, 2007 at 02:50:46 Pacific
Reply:

Which is why I asked what your problem was.


0

Response Number 4
Name: cssExp
Date: June 18, 2007 at 03:56:37 Pacific
Reply:

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. :)


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Update DIV height - javascript

Updating Text with JavaScript www.computing.net/answers/webdevel/updating-text-with-javascript/133.html

HTML link titles time out www.computing.net/answers/webdevel/html-link-titles-time-out/3770.html

javascript onclick add member www.computing.net/answers/webdevel/javascript-onclick-add-member/2028.html