div tag height problem in firefox

Posted on 2007-04-09
Medium Priority
Last Modified: 2013-12-07
I am developing my site using css.no table tags are used .developed using div and ul ,li tags.
I have a site which is working perfectly fine in ie6 and ie 7 but it is not showing me proper layout in firefox.

I am increasing height of left side navigation using JavaScript on click of technology option in top menu.
Menu is display correctly in firefox. But when I am writing


It is showing me error in firefox that

document.getElementById("sidenav") has no properties

How to adjust div tag height using JavaScript in firefox.

Below is the url of that page:


And footer div tag is coming in header..........

Is their any other way to do this...?
Question by:dotsandcoms
  • 2
  • 2

Assisted Solution

jawahar_prasad earned 1440 total points
ID: 18875192
Try this..


Accepted Solution

jawahar_prasad earned 1440 total points
ID: 18875204
ignore that...


<title>Untitled Document</title>
<script language="javascript">
function fn()

<div id="sidenav" style="background-color:#000099;">asdasdasd</div>
<a href="#" onclick="fn()">Click</a>

"getelementbyid"  property is CASE SENSITIVE, It should be "getElementById"
LVL 28

Assisted Solution

TName earned 80 total points
ID: 18875294
I can't find any "sidenav" element. There is a ul with the id "subNav".
You are trying repeatedly to access it with
document.getElementById("subnav") - all lower case...

but it should be

document.getElementById("subNav")    //  "subNav" with an uppercase "N"
LVL 21

Assisted Solution

by:Dale Burrell
Dale Burrell earned 480 total points
ID: 18875304
I believe that according to the standards it requires units e.g.

LVL 21

Assisted Solution

by:Dale Burrell
Dale Burrell earned 480 total points
ID: 18875316
And yes - definitely need to get the ID's correct as they are case sensitive - assume everything is case sensitive and you'll never have to worry.

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question