help make this list horizontal (4 posts)

  1. shmish
    Posted 10 years ago #

    I've read about Horizontal Menus, but I'm not sure how to adapt this concept to my list. I'm not even sure if it can be done this way.

    The code for the list is ?php $arc_query = new WP_Query('orderby=post_date&order=DESC&showposts=4'); ?> <?php while ($arc_query->have_posts()) : $arc_query->the_post(); ?> <a>" title="<?php the_title(); ?>"><?php echo $post->post_excerpt; ?></a><?php endwhile; ?

    The excerpt are actually thumbnails for a photoblog. I would like the thumbnails to be listed horizontally.

    Any help is appreciated

  2. Ryan Fitzer
    Posted 10 years ago #

    Do you have a link so we could see what html this script generates. If I understand it correctly, you could just adjust the css accordingly.

  3. shmish
    Posted 10 years ago #

    Oops, sorry. Here is the website: http://www.alpinevisions.dryfly.ca

    I've tried adding:
    display: inline;
    to various places in the css but didn't have any luck.

    I don't know if that should work or not. Perhaps it should work but I just didn't add it to the correct style.

  4. Ryan Fitzer
    Posted 10 years ago #

    I'm assuming you talking about the little thumbnails towards the bottom? If so, the reason that is happening is that the images are nested in <div> elements, which are block level elements. You can take them out of the <div> and it should go horizontal like you want it. If that is not an option you can simply use this rule:

    li div {

    This will only put two side by side as your containing element seems to have a defined witdh. Change that width and all should be fine.

Topic Closed

This topic has been closed to new replies.

About this Topic