thumbnail and excerpt text float
hi
I would like for excerpt text to float to the right of a thumbnail on my home page, as it does on the actual post page. However, the thumbnail is above the text making the excerpt box just too big vertically. Is there an easy way to do this? http://www.chipbrock.org/ thanks. |
add a class of 'alignright' to the <img...> then change the
HTML Code:
<p style="clear: both;"> |
hi
Thanks for the reply. I see that it indeed did what I want, but I don't understand why! The alignright certainly moved the image to the right in the post. But, it is still left in the thumbnail-excerpt, which is what I want. But, I guess I don't understand the interplay between the display in the post which seems to follow the html in the post...and the rendering in the excerpt on the home page. I'm willing to live with the uncertainty :) unless you can point me to the "why" of that change. Apart from that, can I modify a template to enforce this? I rummaged around in functions.php, but didn't see where this could be enforced. I fear that if I did so, I'd just mess it up when I brought in the next image and placed it with the image tool? thanks |
How have you set up your post for the image and thumbnail?
|
hmm. Not sure I know what you mean by "set up my post". I migrated to Atahualpa yesterday from another theme. What I do is add the figure in the post page and up comes the "Add an image" window to select a file. Then I "Use as thumbnail" from that... Is that what you mean?
|
ok, never mind I know what is happening. There is a new feature in WordPress - thumbnails - but it's something that is entirely put in by WordPress - ie Atahualpa doesn't tough it, so you can't add the 'alignright' to the thumbnail image that WordPress adds to the post, so it gets left aligned.
However, we can use the class that WordPress uses for the thumbnail and give it the css associated with alignrignt and ...tada...it will align the thumbnail to the right. Add this to ATO->Add HTML/CSS Inserts->CSS Inserts HTML Code:
.post img.attachment-post-thumbnail { |
thanks. Actually, that put all of the images to the right of the excerpt box on the home page (indeed, inline with the text, so that's good), but left it as left in the actual post ...which is what the "Add an image" path selected, and which I left alone. So, something's conflicting as the actual code change that you originally suggested for the post itself, did the opposite: post, image right; excerpt, image left.
|
|
When you add an image in a post you choose to left, center or right align it. The choice you make puts in the class align left, align center or align right in the <img...> statement. If you want the image right aligned in the post, just add the align right to the class
|
So, by doing so, somehow that overrules the change to the CSS Inserts. But, you know, while I don't understand the opposite behavior from your original suggested hardcode in the post, I kind of like it in the right hand side of the excerpt. That adds some visual heft to the center.
|
The CSS insert in post 6 will only effect the thumbnail image in the excerpt. In the post, the align right will only apply when viewing the full post.
|
All times are GMT -6. The time now is 10:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.