|
#1
Jun 13, 2010, 05:09 PM
|
|
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.
|
#2
Jun 14, 2010, 08:36 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
add a class of 'alignright' to the <img...> then change the
HTML Code:
<p style="clear: both;">
to just '<p>'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#3
Jun 14, 2010, 03:59 PM
|
|
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
|
#4
Jun 14, 2010, 04:18 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
How have you set up your post for the image and thumbnail?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#5
Jun 14, 2010, 04:25 PM
|
|
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?
|
#6
Jun 14, 2010, 04:27 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
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 {
float: right;
margin: 10px 0 5px 10px;
}
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#7
Jun 14, 2010, 04:37 PM
|
|
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.
|
#9
Jun 14, 2010, 05:04 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
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
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#10
Jun 14, 2010, 05:11 PM
|
|
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.
|
#11
Jun 14, 2010, 07:00 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
|