473,386 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

el.style.height not working

Hi Folk

Can someone tell me why this simple example is not working (javascript
wise):

http://www.photowarehouse.co.nz/test.html

Thank you
Nicolaas
Apr 23 '07 #1
2 2709
On Apr 23, 6:21 pm, windandwaves <nfranc...@gmail.comwrote:
Hi Folk

Can someone tell me why this simple example is not working (javascript
wise):

http://www.photowarehouse.co.nz/test.html

Thank you
Nicolaas
The reason why this is not working is because the el.style.height is
empty therefore doing parseFloat returns NaN (not a number).
You should use getComputedStyle(el, null) or el.currentStyle (in IE)
to get the height. This will solve your problem.

-Jason

Apr 23 '07 #2
Thank you Jason - that worked!

Apr 26 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Bura Tino | last post by:
Hi, Going forward, what's better to use <td height="20"> or <td style="height:20;">
4
by: Robert Secon | last post by:
Hi there, when using IE5+ my style sheets just work fine, but Mozilla does not agree with it and I canīt figure out which mistake it is. Usually the thing about it is that every row is displayed...
4
by: lawrence | last post by:
Can anyone tell me why this code works in Netscape 7.1 but not in IE??? <SCRIPT type='text/javascript'> function makeVisible(nameOfDiv) {...
21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
3
by: charley | last post by:
Hello, The appearance of the page should be for the main image, lpmap.jpg, to be on the bottom, (z-index: 1), with pictures, (image0.jpg - image9.jpg), and accompaning notes to appear on top,...
33
by: amerar | last post by:
Hi All, I can make a page using a style sheet, no problem there. However, if I make an email and send it out to my list, Yahoo & Hotmail totally ignore the style tags. It looks fine in...
1
by: mfurey | last post by:
Can someone look at the following page and tell me what I did wrong with the style sheet linkage, or perhaps the document type declaration? I had this working properly off of one server, but now...
4
by: aashen | last post by:
I'm building a new site and using the Lightbox2 photo gallery(http://www.huddletogether.com/projects/lightbox2/). I have several images...each open up their own gallery. I was having a problem with...
3
by: Michellevt | last post by:
Hi I am working on a project (for college) and wondered if anyone can help me with my problem. In the project we are not allowed to make use of any "style" attributes but "class" attributes...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.