Hi, all —

I've been absent from the community for a while (he said sheepishly) but am 
now trying to give my TiddlyWikis some overdue tender, loving care.  I've 
run into an odd behavior in TiddlyWiki Classic that has me stumped.

I've created some styles for controlling the maximum width of elements 
(specifically, images — but also tables, so that large images in cells 
won't push them past tiddler borders):
 

> .tiddlerw img,
.tiddlerw table {
  max-width:99%;
}

.400w,
.400w img,
.400w table {
  max-width:400px;
}


This works exactly as intended:

{{tiddlerw{[img[path/to/giant-3800-pixel-wide-image.jpg]]}}}

... restricting the image display to 99% of the width of the available 
tiddler.

This, however, does not:

{{400w{[img[path/to/giant-3800-pixel-wide-image.jpg]]}}}

I thought perhaps max-width values in pixels might not be supported by 
Firefox — but when I use inline HTML (e.g. <HTML><img 
src="path/to/giant-3800-pixel-wide-image.jpg" 
style="max-width:400px;"></HTML>), it works like a charm.

I also thought max-width values in pixels might not be support by 
TiddlyWiki — but when I changed max-width:400px; to max-width:50%; in the 
.400w styles to test the theory, that didn't work, either.

So I thought the class name 400w might be the problem and tried a variety 
of different class names.  No luck.

I'm currently stumped as to why the .tiddlerw style works and .400w (or 
whatever I rename it to) doesn't.  Surely I'm missing something blindingly 
obvious.

I'm creating a loading a test case here so you can see it in action:  
http://tiddlywiki.secret-hq.com/testing/MaxWidthsTest.html

-- 
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 http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a5e149dd-5191-4376-9f57-69265668e01b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to