Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-07-04 14:45:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

position:relative breaks Remora menus

Just been tracking down a weird thing where the Remora menus sometimes disappear behind (my) plugin content.

It seems to manifest itself if the plugin in question — for example smd_thumbnail — puts some content in the txp-control-panel area at the top of the page and specifies its wrapper to have position:relative. The collapsible fieldset I use in that plugin, for example, has relative positioning so I can float the Tools/Prefs button to the right and know that it’ll appear relative to the container and not some other container further up the DOM tree. That’s how I understood positioning to work: that the position of a child floated/relative/absolute item is positioned as an offset from its closest parent that has a position rule (which is why people scatter position:relative around the place). I may have got that wrong; please let me know if so.

Anyway, if I remove the position:relative, the menus work properly, floating above the page content. But my buttons disappear :-( I can’t figure out a way to make them co-exist because I’m not a great CSSer.

A few ‘fixes’ come to mind:

  1. add #nav li ul { z-index:10000; } to my plugin’s CSS
  2. add #nav li ul { z-index:10000; } to Remora’s CSS
  3. fix the plugin HTML/CSS such that it avoids the problem altogether

This also plagues a few of my other plugins so I’d like to work out a solution. To me, option 3 is the best / least hacky / least disruptive bet. Does anyone have any advice please?

Last edited by Bloke (2011-07-04 14:45:50)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#2 2011-07-04 16:16:52

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: position:relative breaks Remora menus

Maybe not related, when I switched to Firefox 4 Remora started acting up. The menus would stick open whenever I would move my mouse up to the URL bar and happened to mouse over one of the menus. It got to a point that it became distracting, especially when writing an article and doing previews and such. I went back to Classic, since updates to the bundled jQuery didn’t fix the anomaly.

Offline

Board footer

Powered by FluxBB