On Wednesday, June 13, 2018 at 5:57:58 AM UTC-7, hubertgk wrote:
>
> Is there a way to make certain elements undraggable through CSS?
> I've so far tried wrapping an image element within a <span> element with a 
> CSS class pointing to the below code but the image was still draggable. Is 
> there a simple way that works?
>
.undraggable {
>     user-drag: none;
>     -webkit-user-select: none; /* Safari, Chrome */
>     -webkit-user-drag: none;
>     -khtml-user-select: none; /* Konqueror */
>     -moz-user-select: none; /* Firefox */
>     -ms-user-select: none; /* IE */
>     user-select: none; /* CSS3 */
> }
>
> <span class="undraggable">[img width=32 [image.svg]]</span>
>
>
You were VERY close!

You need to specify that the rule applies to the "img" element WITHIN the 
"undraggable" class wrapper.  Thus:

.undraggable img { ... }

then, 

<span class="undraggable">[img width=32 [image.svg]]</span>

will work as you intend.

enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)
InsideTiddlyWiki: The Missing Manuals

 

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/310fb0c6-1ebd-4bc2-95e6-e7b4b25b4ac2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to