Getting posts inline
-
Having trouble getting my posts to line up next to each other, three in a line. What can I do?
Thank you!
website: http://www.sophieharris.co.uk/portfolio/category/interviews/
CSS:
.siriusgrids { width:220px; float:left !important; display:inline-block !important; clear:both !important; overflow: hidden; position:relative; }
LOOP:
<div class="siriusgrids"> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div style="float:left; padding:0px 0 0 4px;"> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'brunelleschi' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="entry-meta"> <time datetime="<?php the_time('Y-m-d')?>"><?php the_time('F jS, Y') ?></time></div> <div class="entry-summary"> <div style="float:left;"> <?php $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); if ( $images ) : $total_images = count( $images ); $image = array_shift( $images ); $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); ?> <div class="gallery-thumb"> <a class="size-thumbnail" style="padding:1px; border:1px color:#888;" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> </div><!-- .gallery-thumb --> <p><em><?php printf( _n( '', '', $total_images, 'brunelleschi' ), 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'brunelleschi' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', number_format_i18n( $total_images ) ); ?></em></p> <?php endif; ?></div> <?php the_excerpt(); ?></div> </div><!-- .entry-summary --> </article> </div>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Getting posts inline’ is closed to new replies.