Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
cross-browser problem #2
Old 10-26-2004, 05:57 AM cross-browser problem #2
Experienced Talker

Posts: 42
Trades: 0
Hi
I've almost got my site ( http://matix.co.uk ) working in Firefox, but the javascript to adjust the height of the divs still isn't working
the javascript:
Code:
function height(){
if( typeof( window.innerWidth ) == 'number' )
{ h = window.innerHeight; }
else if( document.documentElement && ( document.documentElement.clientHeight ) )
{ h = document.documentElement.clientHeight; }
 else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
{  h = document.body.clientHeight; } 
var e = document.getElementById("content");e.style.height = h -212
}
Thanks very much
__________________

Please login or register to view this content. Registration is FREE
thepersonof is offline
Reply With Quote
View Public Profile Visit thepersonof's homepage!
 
 
Register now for full access!
Old 10-26-2004, 06:50 AM
nick89's Avatar
Super Talker

Posts: 136
Location: Brisbane, Australia
Trades: 0
why not set the div's height to 100%?
nick89 is offline
Reply With Quote
View Public Profile Visit nick89's homepage!
 
Old 10-26-2004, 07:38 AM
Experienced Talker

Posts: 42
Trades: 0
yeah, when I was using tables someone suggested doing that with the middle row ( http://www.webmaster-talk.com/showthread.php?t=11215 ), but I couldn't get it to work and I was told there were cross-browser problems.....

Thanks though, I'll give it a try and see if it works!
__________________

Please login or register to view this content. Registration is FREE
thepersonof is offline
Reply With Quote
View Public Profile Visit thepersonof's homepage!
 
Old 10-26-2004, 07:48 AM
Experienced Talker

Posts: 42
Trades: 0
Unfortunately when I did that and disabled the javascript it had no effect. Thnkas though for the suggestion.
__________________

Please login or register to view this content. Registration is FREE
thepersonof is offline
Reply With Quote
View Public Profile Visit thepersonof's homepage!
 
Old 10-27-2004, 09:28 AM
NateDogg's Avatar
Extreme Talker

Posts: 163
Trades: 0
Try talking to Nucco, he was having some problems with his CSS and solved it using straight CSS and div's as far as I understand. He may have some tips.
http://www.webmaster-talk.com/showthread.php?t=17468
__________________
Nathan


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
NateDogg is offline
Reply With Quote
View Public Profile
 
Old 10-27-2004, 09:46 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Take a look at my recent project:

http://eggp.ggpsystems.co.uk/eggptest

There's a lot of element-sizing cross-browser javascript in there. Also take a look at

http://eggp.ggpsystems.co.uk/eggptest/scripts/api.js

for some more generic javascript functions which come in handy quite often.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 10-27-2004, 12:23 PM
Experienced Talker

Posts: 42
Trades: 0
I added
Code:
document.write(h);
and it got the right number, so I think that it must be something to do with the
Code:
var e =document.getElementById("content");
e.style.height = h -212;
Please help, I just can't figure out why it wont work!
__________________

Please login or register to view this content. Registration is FREE
thepersonof is offline
Reply With Quote
View Public Profile Visit thepersonof's homepage!
 
Old 10-27-2004, 11:14 PM
Nucco's Avatar
Novice Talker

Posts: 7
Location: Moose Jaw, SK. Canada
Trades: 0
Sorry, I'm not too familliar with Javascript. I only work with HMTL, CSS, and PHP right now. Wish I could help though.
Nucco is offline
Reply With Quote
View Public Profile Visit Nucco's homepage!
 
Old 10-28-2004, 03:13 PM
Experienced Talker

Posts: 42
Trades: 0
Whoops! The mistake was really simple: e.style.height = h -212+"px";
Thanks for all your help.
__________________

Please login or register to view this content. Registration is FREE
thepersonof is offline
Reply With Quote
View Public Profile Visit thepersonof's homepage!
 
Old 10-28-2004, 06:32 PM
NateDogg's Avatar
Extreme Talker

Posts: 163
Trades: 0
Sometimes the easiest errors can evade dectection
lol
__________________
Nathan


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
NateDogg is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to cross-browser problem #2
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.47119 seconds with 12 queries