473,372 Members | 1,086 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,372 software developers and data experts.

Match Length with CSS and JavaScript

Two samples are provided for this isse ...

tlanet.net/1.html - attempt to match heights with CSS
tlanet.net/2.html - match height with CSS and JavaScript

The second example correctly calulates the size of a Div to match another
Div that varies from page to page.

This solution works in Internet Explorer and Opera but not Firefox and
Netscape.

Can you tell me why?

Thanks.,

.... Thom
Sep 21 '07 #1
2 2023
th**@tlanet.net wrote:
Two samples are provided for this isse ...

tlanet.net/1.html - attempt to match heights with CSS
tlanet.net/2.html - match height with CSS and JavaScript

The second example correctly calulates the size of a Div to match another
Div that varies from page to page.

This solution works in Internet Explorer and Opera but not Firefox and
Netscape.

Can you tell me why?

Thanks.,

... Thom
Testing your JavaScript revealed that you are setting {element}.height =
128, which is incorrect JavaScript.

Try changing it to {element}.height = {value}+"px" and see how that line
of code works.

It also appears that the height you end up setting to the element via
JavaScript is not what you want it to be...

--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
Sep 22 '07 #2
Yes ... I discovered that in parallel to your reply ...

IE and Opera accept it with or without the "px"
Firefox and Netscape require that the "px" be present.

Thank you for the help.

.... Thom
Sep 22 '07 #3

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

Similar topics

20
by: Ravi | last post by:
Hi, I have about 200GB of data that I need to go through and extract the common first part of a line. Something like this. >>>a = "abcdefghijklmnopqrstuvwxyz" >>>b = "abcdefghijklmnopBHLHT"...
6
by: Mark Findlay | last post by:
I am trying to figure out how to set up my reg exp search so that the search will only match on the exact word. Here is the current problem code: Word1 = "RealPlayer.exe" Word2 = "Player.exe"...
2
by: GreggTB | last post by:
Hello, I'm trying to perform a very simple validation of user input. I want to verify that the user entered a six-digit string consisting entirely of numbers. So anything from 000000 to 999999 is...
12
by: Andy Jeffries | last post by:
Hi all, I want to write a function that given two elements will make their heights equal to the larger element. I've had a go at it and it works, but it makes both their heights larger than...
0
by: hwait | last post by:
I've a string (got it via WebRequest): <td class=maintable noWrap bgcolor=#666666><b><font color=#ffffff>HDR A </font></b></td> .... Inner text A .... <td class=maintable noWrap...
2
by: stealth_spoof | last post by:
Hi People wondering if anyone can help me with a problem I'm having I'm trying to create an array with an unspecified length, the length is based on the result i get from another task in the code...
17
by: Randy Webb | last post by:
I know that the /g flag will match all occurrences. Is there a way, with a Regular Expression, to match all occurrences *except* the last one? pattern = /df/g; var myString = "asdfasdfasdfasdf";...
9
by: shellon | last post by:
Hi all: I want to match a string that not ended with the string "welcome", how do write the RegExp? Appreciate your help!
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.