Well, I thought that worked. It's now causing a different problem.
I have individual image tiddlers that contain an <img> tag, pointing to an external image and specifying a CSS class. I then have a series of macros that transclude said tiddler within divs that are modified by other CSS classes. Since I wanted the image tiddler to show an image without knowing its file extension, I did the following to make an image fallback:
Example Image Tiddler:
<object data="x.jpg" class="basic_image">
<object data="x.png" class="basic_image">
<img src="x.bmp" class="basic_image">
</object>
</object>
I have the following macros that I use with the image tiddler:
\define single_image(target_image)
<div class="single_image">
<<basic_image $target_image$>>
</div>
\end
\define basic_image(target_image)
<$button message="tm-modal" param="$target_image$" class="button_image">
<div class="image_container">
{{$target_image$}}
</div>
</$button>
\end
.basic_image {
min-width: 150px;
}
html .image_container {
background: #444444;
border-radius: 5px;
padding: 5px;
}
.button_image{
padding: 0px;
margin: 0px;
background-color: #444444;
border: none;
}
.single_image {
float:right;
width: 150px;
margin: 5px;
}
However, if one of the object tags is pointing to an existent file, this is the result:
The first situation is the intended result. It looks like the <object> tag isn't inheriting the width of the div with the single_image class, and I'm not sure how to rectify this problem.