menu image preload necessary, or dimensions
- timrichardson
- Topic Author
- Offline
- New Member
-
- Posts: 3
- Thank you received: 0
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.
- debartoloa
- Offline
- New Member
-
- Posts: 2
- Thank you received: 0
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?
Please Log in or Create an account to join the conversation.
- debartoloa
- Offline
- New Member
-
- Posts: 2
- Thank you received: 0
If somebody resolved in other way please reply me!
Please Log in or Create an account to join the conversation.