Line 464 of imagemenu.module adds 'style=float: left' to reorganise menu items from a vertical list to a horizontal list. There are two problems with this approach. First, using float takes the content out of the normal content flow (http://www.w3.org/TR/CSS2/visuren.html#floats) which makes it difficult to do things such as, say, centring the menu items to a page. More importantly, though, because the float is hardcoded into the raw HTML, it's impossible to override it with a CSS file because the style property will always take precedence!
I see two possible solutions to fixing this problem. The first is to make a 'horizontal-imagemenu' or something-to-that-effect class so that the property is CSS selectable and have the mod provide its own mutable CSS file. The other, quicker and dirtier approach, is to change 'style=float: left' to 'style=display: line' on line 464 which will avoid the problems with using floats and will, at least for the time being, make me happier :)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | imagemenu.module.diff | 1.65 KB | Anonymous (not verified) |
Comments
Comment #1
glennnz commented+1
Quick fix above works, but need to be style=display: inline, not style=display: line
Comment #2
Anonymous (not verified) commentedMuch obliged. Thanks for catching my typo.
Comment #3
Anonymous (not verified) commentedI decided to roll up my sleeves and take a stab at fixing the problem myself. Please find attached a patch file for imagemenu.module (somewhat but not exhaustively tested). In addition to this patch,
needs to be added to imagemenu.css.
This is my first patch ever so please forgive me if my use of
diffis riddled with errors.Comment #4
Fanaile commentedI applied this patch and have done some preliminary testing on one site.
So far I have not come across any problems and the menu is working nicely. I will let you know whether or not any errors come up or if I come across any issues.
Comment #5
summit commentedSubscribing, greetings, Martijn
Comment #6
ratinakage commentedWas this patch ever applied?
Comment #7
Anonymous (not verified) commentedNope! Still present as of version 1.4. Surely someone can take 10 minutes to merge the patch in. Of course, with other changes, it'll probably need reworking!
Comment #8
summit commentedShouldn't this be RTBC then?
greetings, Martijn
Comment #9
Anonymous (not verified) commentedThe project may need new maintainers since neither have logged in during the past year
Comment #10
Anonymous (not verified) commentedComment #11
pobster commentedIt's not abandoned, I just didn't imagine that anyone would still be using D6. Also this module was originally written for D4.7 (I think, it was quite a long time ago) and there are far better ways to achieve image menus now. Creating a separate menu system to hold this information is just not necessary anymore, all that's needed is to alter the menu forms to add the upload box. Anyways, with modern-thinking I very much doubt anyone should be making menus like this anyway? That said, I see there's a whole bunch of modules that have sprung up which offer the same functionality.
Pobster
Comment #12
pobster commentedClosing as D6.x is now unsupported.