Layout Issues While Editing Wordpress

Soldato
Joined
10 Dec 2003
Posts
6,348
For a few months, I've been editing Wordpress in every way I can, and I love it. It has taught me so much about PHP and the importance of organising code.

One problem I'm having now though, is quite annoying. In Wordpress, I can write a post and, if I so like, I can include an image in that post. One thing I've decided to do though, is use the 'Optional Excerpt' option on the 'Write Post' admin page, and using the_excerpt() to call it within each post.

I then contained it in a DIV, called 'quote' and used CSS to apply float: left;, so now it appears in the top left of the post, in it's own box, to provide a quick and easy-to-read excerpt, without having to read the whole post and finding out it bored you.

The problem though, is when I include an image as part of a posts' content. The image is the full width of the containing DIV, so my 'quote' DIV floats above it, as opposed to floating below it, as part of the text.

I can't quite work out the problem in order to find a solution, and my brain hurts. Any ideas?

Here is the code, thus far:

Code:
				<div class="post">
					
					<?php the_content(__('(more...)')); ?>
					
					<div class="quote">
						
						<?php the_excerpt(); ?>
					
					</div>
					
						<?php wp_link_pages(); ?>
						<p><?php comments_popup_link(__('Feedback (0)'), __('Feedback (1)'), __('Feedback (%)')); ?></p>
						<?php comments_template(); // Get wp-comments.php template ?>
						<?php endwhile; else: ?>
						<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
						<?php endif; ?>
						<?php posts_nav_link(' — ', __('&laquo; Older Posts'), __('Newer Posts &raquo;')); ?>

				</div>

If each image, within each post, had it's own 'calling' function (e.g. the_content_image), I'd be able to fix it. But the_content contains everything, including the image. I'm stuck.
 
Back
Top Bottom