Here's another version that allows you to *completely bypass the 
type="popup" positioning and "cook your own"*

<div style="position:absolute;right:0;z-index:2;">
<$button popup=<<qualify "$:/state/popup/something">
>>{{$:/core/images/options-button}}</$button>
<$reveal state=<<qualify "$:/state/popup/something">> type="nomatch" 
text="" class="tc-popup-handle" style="position:relative;">
   <div class="tc-drop-down" style="position:absolute;right:0;min-width:fit-
content;padding:0.5em;" >
      enter stuff here: <$edit-text tiddler="whatever" tag="input" 
default="" placeholder="" />
   </div>
</$reveal>
</div>

1) The outermost div controls the position of the $button/$reveal 
combination so it will appear in the margin and won't affect any other 
content
2) The $button uses popup="..." to toggle the popup state between 
blank/non-blank.
3) The $reveal uses class="tc-popup-handle" to 'eat' any clicks inside it 
without dismissing the popup
4) The $reveal also uses style="position:relative;" to establish a new 
(0,0) origin for it's contents
5) The div uses class="tc-drop-down" to get the box around the content and 
style="position:absolute;right:0;" to set the location of the tc-drop-down, 
relative to the origin established by the $reveal
7) The div also uses style="min-width:fit-content;padding:0.5em;" to adjust 
the appearance of the tc-drop-down

I prefer the above approach over using "float" and "margin" styles, as it 
is more explicit in how things should be placed and will never affect 
anything else around it.

-e


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ae22e7e1-a94a-4a5d-8591-8dd1da716769o%40googlegroups.com.

Reply via email to