Using some classy CSS, you can make text flow nicely around images, rather than having to set stuff up using tables, and demonstrated in this post.
Basically, you just put the following into your CSS file:
.left {
float:left;
}
.right {
float:right;
}
And then wrap the image in <div class='left'> ... </div> tags (or class='right' to make it sit on the right of the text).
You can use margin:15 0 15 25; for example to put a margin of 15 on the top, 0 on the right, 15 on the bottom and 25 on the left, so that the text does not come right up against the image.
I also change some text properties in my CSS, so I can include a caption inside the <div class='left/right'> ... </div> tags and it will be italic, centred and so on. I’ll leave these as an exercise to the reader.
•
If you just use the code above, you can also use this whenever you have post-links, or page-links, so that one always appears on the left, and the other on the right. I have now removed every table from the site, except the one on the page this article links to.
Hi Matt!
I use ecto too, but find the image placements sometimes limiting. I had a group of images that I wanted to place without using a table or CSS recently, and I needed to find a cross-platform/cross-browser solution…
It’s thick with code due to the javascript pop-ups for each image, but might be worth a peek if you’re interested. It’s permalink is: london-big-red-crane-capital-of-the-world
I know it’s not exactly what you were achieving, but it was a really tricky image placement issue for ultimate compatibility. It’s not my prettiest work, but it achieved what I needed. As you mentioned in your original post, doing such additional coding kinda takes the ease of use out of ecto- however, I’m not sure the average ecto user is trying to get as crafty as we are…
Cheers,
jEN
13 hours, 6 minutes after the fact.
Thanks jEN, I’ll look into it.
Sorry about the Spaminator thing: I don’t know what’s going on. I think I’ll disable it, as I don’t get that many Spam comments anyhow.
I don’t use ecto that much anymore, mainly due to the fact my host has a bug in their XMLRPC file, and it escapes certain characters, such as ‘ and “, ruining most code.
13 hours, 37 minutes after the fact.
The Spaminator issue was to do with having too many dashes in a URL. I uninstalled Spaminator because of this.
1 week, 6 days after the fact.