...

View Full Version : CSS Nav bar font glitch



Discokitty
08-04-2010, 03:20 PM
The nav bar when the page loads darts forward 2 pixels and then back to its original position. Is it because of the linked font? If so how do I change it?
If you click the links in the left hand column its really obvious.

This is doing my head in. PLZ can someone have a look see? Many thanks in advance!
www.de-signstudio.com
:confused:

skywalker2208
08-04-2010, 05:11 PM
I don't see it. Is this in a specific browser or all browsers?

Discokitty
08-04-2010, 05:20 PM
Even if you click on the left hand colomn links under gallery?
I could see it on my mac and it was also visible on PC IE.

Try clicking the links under the gallery..

and thank you sooooo much for your attention, I didnt think anyone was going to help me.

Discokitty
08-04-2010, 05:29 PM
How'd you go? It doesn't pop up if you just click on the nav bar... you need to click on the links under Galleries...


(:

skywalker2208
08-04-2010, 05:43 PM
I did click the links under the gallery menu and it doesn't do it for me. I am currently using firefox.

Discokitty
08-04-2010, 06:21 PM
Thanks for your help skywalker. Much appreciated. (:

Discokitty
08-04-2010, 06:24 PM
Can you try IE?

Discokitty
08-04-2010, 06:25 PM
Sorry to ask..

skywalker2208
08-04-2010, 06:55 PM
I see it in IE7.

I wonder if the code below is causing the problem.


<script type="text/javascript"> Cufon.now(); </script>


I read on the site that it can cause problems in IE, but to put it before the closing body tag. I see that you did that, but try removing it and see if the problem continues.

VIPStephan
08-04-2010, 07:06 PM
It has definitely got something to do with the Cufón script if it only moves after the page has loaded (because this is when scripts are executed). But my IE is making problems currently so I can’t check it (and debugging in IE is a pain anyway). What you can do would be to test this on a stripped down page and put a border around the parent element to see if it’s always happening and if yes, when and what is happening.

Discokitty
08-04-2010, 07:15 PM
<script type="text/javascript"> Cufon.now(); </script>

So with this code... Should I delete - Cufon.now();
completely and test it?
Is that what you were saying sky?

skywalker2208
08-04-2010, 07:22 PM
<script type="text/javascript"> Cufon.now(); </script>

So with this code... Should I delete - Cufon.now();
completely and test it?
Is that what you were saying sky?

Yes remove that line of code completely and see if you still have the problem.

Discokitty
08-04-2010, 07:28 PM
yeah I tried your suggestion. And no luck. )):
What else can I do? Should I just use a system font. Will that help?

Discokitty
08-04-2010, 07:31 PM
Its like 3am here. I have to go to bed. am so tired. If you can fix the probelm - Ill pay you for you time. Do you need the files?

Discokitty
08-04-2010, 07:33 PM
Whats you email address? mine is laila@lokomotion.com.au
Would emailing you the files help?

Sorry Im desperate. I've been trying to fix this issue for weeks now

skywalker2208
08-04-2010, 07:51 PM
Remove the lines of code below from your file.



<script src="De-signstudio_files/Myriad_Pro_700.js" type="text/javascript"></script>
<script src="De-signstudio_files/Myriad_Pro_400.js" type="text/javascript"></script>


You can put the code below back.


<script type="text/javascript"> Cufon.now(); </script>

Discokitty
08-05-2010, 04:11 AM
Hey Sky... Any more thoughts re the issue?

skywalker2208
08-05-2010, 05:30 AM
I see you took those lines of code out and it doesn't do it for me anymore.

SB65
08-05-2010, 04:12 PM
Hmm, I still see the issue on IE7. It is definitely the Cufon text replacement that is causing the problem, as in IE7 the original font is briefly visibly before the Cufon replacement takes place.

I'm not sure why that delay occurs however. The script Cufon.now() normally prevents this happening in IE.

There might be a way to minimise the effect somewhat, however. The "jog" to the left is caused because the Cufon replaced font is smaller than your default font, and your menu items do not have a set width. Thus with the larger font the width of each menu item expands and everything appears to shift to the right momentarily.

So, if you set a width to your menu items even if the text momentarily gets bigger the items shouldn't all shift to the right.

Not an ideal fix I realise.

skywalker2208
08-05-2010, 04:24 PM
The home page doesn't do it for me anymore, but other pages that has the code below still does it. If you are still seeing the problem then maybe it is a cache problem.



<script src="../js/Myriad_Pro_700.font.js" type="text/javascript"></script>
<script src="../js/Myriad_Pro_400.font.js" type="text/javascript"></script>

SB65
08-05-2010, 04:36 PM
Home page doesn't do it because the font files have been removed - so there's no Cufon replacement going on.

EDIT: Other things to rule out..at the moment you have the call to your cufon-replace.js before the links to the font scripts. Worth moving this to after them I think.
EDIT AGAIN: Although I doubt that'll fix it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum