menu image preload necessary, or dimensions

menu image preload necessary, or dimensions was created by timrichardson

Posted 12 years 6 months ago #764
Hi.
I have a horizontal CK main menu with a submenu 'People', which has three entries.
Each entry (a person) has a portrait image. On first load, the background of the drop down menu doesn't go down far enough: the images and text for items 2 and 3 (the bottom most items) are below the end of the background block, and it looks ugly and is hard to read.

When the images are cached, it seems to be ok. This problem is much more pronounced on Google Chrome, it can be reproduced by clearing the cache and reloading www.growthpath.com.au (and then try the people menu). I guess that the rendering engine doesn't know the size of the images are before they are loaded, so it doesn't allow enough room when calculating the background block.

After visiting the people page, returning to the home page and again viewing the People menu, it renders correctly. This is why I think it's something to do with browser caching.

I tried some javascript to preload the images (added a script the HEAD section of my HTML template file) but it didn't make any difference.

What's the best solution?

Please Log in or Create an account to join the conversation.

Replied by debartoloa on topic Re: menu image preload necessary, or dimensions

Posted 12 years 2 weeks ago #2311

timrichardson wrote: Hi.
I have a horizontal CK main menu with a submenu 'People', which has three entries.
Each entry (a person) has a portrait image. On first load, the background of the drop down menu doesn't go down far enough: the images and text for items 2 and 3 (the bottom most items) are below the end of the background block, and it looks ugly and is hard to read.

When the images are cached, it seems to be ok. This problem is much more pronounced on Google Chrome, it can be reproduced by clearing the cache and reloading www.growthpath.com.au (and then try the people menu). I guess that the rendering engine doesn't know the size of the images are before they are loaded, so it doesn't allow enough room when calculating the background block.

After visiting the people page, returning to the home page and again viewing the People menu, it renders correctly. This is why I think it's something to do with browser caching.

I tried some javascript to preload the images (added a script the HEAD section of my HTML template file) but it didn't make any difference.

What's the best solution?


Dear, I have the same problem! Submenu height is shorter then entries! Problem appear only on the first load of site web as you said! Have everyone resolved problem?
Attachments:

Please Log in or Create an account to join the conversation.

Replied by debartoloa on topic Re: menu image preload necessary, or dimensions

Posted 12 years 2 weeks ago #2334
I deactivated all effect of MaxiMenu and it works! This is a simple solution but it is not a good solution for the frontend!

If somebody resolved in other way please reply me!

Please Log in or Create an account to join the conversation.

Time to create page: 0.768 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 879 guests and 2 members online