On the Six Apart ProNet, there’s a spiffy article about how to straightforwardly put drop shadows around text or graphic elements using pure CSS, in a way that works in both IE and Mozilla (and which degrades nicely where CSS isn’t supported).
Spiffy, yes, but also not anything that I’d casually start using, requiring as it does extra containers and classes and stuff like that. It’s not as horrific as the page makes it seem, but rather than what I do now …
<img src=”xyz.jpg” class=”right”>
… I would have to do this …
<div class=”ydsf right”><div class=”inner”><img src=”xyz.jpg”><br></div></div>
I suppose I could create a relatively easy macro inside of, say, SharpMT to do that. Actually, pretty easily.
Hmmmm.
Well, we’ll see. I’ll add it to my to-do list …
Hmm, a macro? You interest me strangely. What is this SharpMT you speak of?
I do drop shadows with just one extra div, called “img-shadow.”
Oooh! Format buttons on the comment form! Shiny! Must look into that later tonight.
1. SharpMT. Offline MT post editor. Greatest thing since sliced bread. There are others I’ve tried that also do a good job, but SharpMT also allows you to define custom tags/code snippets to drop into your post (these can be stand-alone or can automatically start/finish an HTML statement). Good program, worth checking out.
2. I’ve seen your drop shadows, and tried implementing them at one point, but had problems. Never followed up on it …
3. Swiped the comment form edit buttons from what’s in the MT edit pages, with various tweaks. I can dig out more on that, if you’ve an interest.
Thanks for the link. I’d seen something called “ecto” and wondered if it was worth bothering with. Snippets would be good. I can create them in HTML-kit, I think, but rarely actually use it.
The drop shadows aren’t mine, they’re Sergio Villareal’s, but it’s interesting that some of his technique shows up in this new one.
I’ll see if David can figure out your MT edit and tweaks, and holler if he gets stumped.
Ecto is a Mac-only client. I’ve heard it’s pretty good.
wBloggar (I think it is) is a cross-platform front end. I found it simultaneously too generic and too complex, and wanted something MT-specific. MTClient is another good one (I’ve gone back and forth between the two).
Being able to post through something other than a transient web form is da bomb.
I take it back — Ecto is available for Windows (though there is a Mac focus). It is also a cross-target-platform tool. Haven’t tried it out.
IMPLEMENTATION:
1. Copied the CSS elements from the ProNet article into my own stylesheet.
2. Renamed the .right and .left elements into .yright and .yleft, because they otherwise interfered with pre-existing styles on the individual post pages.
3. Uploaded the gif and png files from the ProNet article; modified the CSS references to match.
4. Changed, in a single entry, the old way of doing my img’s to the div brackets above.
RESULTS: It works … on the individual post pages. On the main index, it doesn’t. Next thing to do is look at what the difference is between the two types of pages.
It also works, sort of, in IE — at least to the extent that my pages rended properly in IE already. Maybe the page review will demonstrate why.
Aaaaand … the Index file is pointing to … a different version of the stylesheet (and thus not including the ydsf stuff — yeah, that’ll do it). And now it works!
Made some further tweaks. I like to have an appropriate margin next to the graphics (so that text doesn’t run into them). I previously had two different classes for img’s, so that the extra space was on the appropriate side, but that doesn’t work, apparently, with this approach. So I’ve modified the main ydsf element as follows:
Aside from the cool tweak of some CSS being invisible to IE (allowing a more sophisticated shadow drawing), what I’ve done is made sure there’s 10px margin, left and right, on each graphic, which provides decent space for text (but, alas, will slightly shift text away from margin of the blog entry).
Anyway, all that in mind, it seems to work now. Yay.
Now I just need to reprogram SharpMT to give me an easy way to do the graphic wrap mentioned above.
The above also adds a margin to the bottom of the graphic element, to push down the blog entry footer.
Turns out I need to strip the class=”right” statement in the IMG statement. Mozilla deals with it cleanly, but IE spits up all over it.