JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 26th, 2012, 10:41 AM
lelales lelales is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2008
Posts: 601 lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level)lelales User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 4 Days 40 m 3 sec
Reputation Power: 37
Javascript sub nav bug

Hi, I have a javascript sub nav, which works fine on all my computers, but on the clients end, they have to refresh the page for the nav to appear properly.

here's what the client sees: click here
here is the site: click here

The sub nav isn't loading properly on their computers.
Can anyone tell me how to trouble shoot or fix this?
thanks

Reply With Quote
  #2  
Old November 26th, 2012, 03:00 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 30th Plane (19500 - 19999 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 19,832 Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level) 
Time spent in forums: 6 Months 1 Day 20 h 43 m 39 sec
Reputation Power: 4192
The first thing to do is to move all of the <script> elements to after all of the <link> and <style> elements.

Are you aware that your page contains errors? The first step in debugging should always be making sure that your code is valid (in order to rule out any errors as the cause for the problem).
http://validator.w3.org/
http://jigsaw.w3.org/css-validator/ (Under "more options", make sure it's set it to use "CSS level 3".)

Conditional comments can not be used inside a stylesheet.
Code:
.twoColFixLtHdr #mainContent { 
	margin: 0px auto 0 210px; /* the left margin on this div element creates the column down the left side of the page - no matter how much content the sidebar1 div contains, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends. */
	padding: 0 0 0 0; /* remember that padding is the space inside the div box and margin is the space outside the div box */
	background: #FFFFFF;
	height:387px;
} 

<!--[if IE 6]>
.twoColFixLtHdr #mainContent { 
	margin:-387px auto 0 210px; /* the left margin on this div element creates the column down the left side of the page - no matter how much content the sidebar1 div contains, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends. */
	padding: 0 0 0 0; /* remember that padding is the space inside the div box and margin is the space outside the div box */
	background: #FFFFFF;
	height:387px;
} <![endif]-->

You could use a CSS filter instead. The "* html" filter targets IE6 and older. Also you don't need to repeat all of the declarations in the rule, only the one(s) that you need a different value for:
Code:
* html .twoColFixLtHdr #mainContent { 
	margin:-387px auto 0 210px; /* the left margin on this div element creates the column down the left side of the page - no matter how much content the sidebar1 div contains, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends. */
} 


Did you intend to post the screenshot as such a small image? Why a GIF? The GIF format is only good for very small images, e.g. 10x10, or simple animations.

The use of tables for layout makes me very sad. Ever heard of "display:table-cell" (which doesn't work in IE7 but does in newer browsers)?
__________________
Spreading knowledge, one newbie at a time. I'm available for hire at Dynamic Site Solutions.

Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

Remember people spend most of their time on other people's sites (so don't violate web design conventions).

Last edited by Kravvitz : November 26th, 2012 at 03:06 PM. Reason: added more info

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Javascript sub nav bug

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap