Thread Starter
tlw22
(@tlw22)
Ok, great thanks! I’ll go give it a go! 🙂
Thread Starter
tlw22
(@tlw22)
I just updated the image however it is still remaining small and not stretching out within the border. Any ideas?
I am not at home or a development PC at the moment, have a look at the twenty ten header, this gets and loads the image by url then you could style the image rather than a div.
I am using this in a theme I am working on, but do not have access to the code atm.
David
Thread Starter
tlw22
(@tlw22)
Thanks, I’ll go have a go. Thanks again for all your help
Thread Starter
tlw22
(@tlw22)
haha! Just changed the div when I was styling it to: post-latest img{ and it works perfectly now. Cheers
I would still try the float:left then the text should wrap rather than going to the line below.
Also it would be nice to post a code snippit of the solution so others may benefit from it.
David
Thread Starter
tlw22
(@tlw22)
Yep I’m just about to make it flow smoothly now 😉
Here is the solution code:
<?php if(!$fisrtimage) : ?>
<?php $fisrtimage=true; ?>
<?php if ( has_post_thumbnail()) : ?>
<div class="post-latest" <?php echo $imgstyle; ?>>
<?php the_post_thumbnail('first-post'); ?>
</div>
<?php endif; ?>
<?php else: ?>
<?php if ( has_post_thumbnail()) : ?>
<div class="post-image" style="" >
<?php the_post_thumbnail('list-post'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
Then style the divs in a css file. If you want to style the images be sure to add img{ at the end of the div. E.g .post-latest img{}
Cheers