i have a div with the width set to 200px.. i want the wordpress loop to operate in there.. the code:
<div id="main1" width="200px">
<?php query_posts('showposts=5'); ?>
<?php while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a><?php the_content(); ?> <?php comments_number('No Comments','1 Comment','% Comments'); ?><br /><br>
<?php endwhile;?>
</div>
when i output the code, however the div shifts to fit the screen. any suggestions on how to resize? i have also tried css too. i have a custom wp theme im working on.
Try <div id="main1" style="width: 200px;">