Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   thumbnail and excerpt text float (http://forum.bytesforall.com/showthread.php?t=7564)

chipbrock Jun 13, 2010 05:09 PM

thumbnail and excerpt text float
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?



juggledad Jun 14, 2010 08:36 AM

add a class of 'alignright' to the <img...> then change the
HTML Code:

<p style="clear: both;">
to just '<p>'

chipbrock Jun 14, 2010 03:59 PM

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?


juggledad Jun 14, 2010 04:18 PM

How have you set up your post for the image and thumbnail?

chipbrock 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?

juggledad Jun 14, 2010 04:27 PM

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;

chipbrock 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.

chipbrock Jun 14, 2010 04:42 PM

should have pointed you to the result.


juggledad Jun 14, 2010 05:04 PM

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

chipbrock 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.

juggledad Jun 14, 2010 07:00 PM

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 02:20 AM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.