Skocz do zawartości

Polecane posty

Mam problem z linkiem do wpisu, chciałbym by wyrównał on do obrazka a nie wyświetlał się pod nim. Poniżej fragment kodu i screen

 

.category {width: 300px;}
.category-inn {padding-top: 10px;}
.category-item {padding: 0 10px 10px 0; border-right: 1px solid #eee;}
.category-item-photo {float:left; width: 110px; padding:3px 5px 3px 0px;}
.category-item-photo a, .category-item-photo img {width: 105px; height:70px;}
.category-item h2 {font-size: 14px; color: #323232; float:left;}
.category-item h2 a {color: #323232; float:left;}
.category-item h2 a:hover {color: #FFAE00;}
.category-list {width: 300px; padding-left: 10px; float: right;}
.category-list li {padding: 10px 0; margin: -10px 0 10px;}
.category-list-title {font-size: 12px; font-weight: normal;}
.category-list-title a {color: #333;}
.category-list-title a:hover {color: #FFAE00;}

 

 

5uj45d9ogvgo_t.jpg

Udostępnij ten post


Link to postu
Udostępnij na innych stronach
<div class="category">
                <div class="block-title"><a href="<?php echo get_category_link( $category ); ?>"><?php echo get_cat_name( $category ); ?></a></div>
                <div class="category-inn clear">
                    <?php
                        $args = array(
                            'cat' => $category,
                            'posts_per_page' => 1,
                            'post__not_in' => get_option( 'sticky_posts' ),
                            'post__not_in' => $exl_posts
                        );
                        query_posts($args);
                        while ( have_posts() ) : the_post();
                    ?>
                        <div class="category-item">
                            <div class="category-item-photo">
                                <?php if ( has_post_thumbnail() ) the_post_thumbnail('ct', array('alt' => trim(strip_tags( get_the_title() )), 'title' => trim(strip_tags( get_the_title() )))); ?>
                            </div>
                          <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                           
                        </div>
                    <?php
                        endwhile;
                        wp_reset_query();
                    ?>
                    <div class="category-list">
                        <ul>
                            <?php
                                $args = array(
                                    'cat' => $category,
                                    'posts_per_page' => $category_perpage,
                                    'offset' => 1,
                                    'post__not_in' => get_option( 'sticky_posts' ),
                                    'post__not_in' => $exl_posts
                                );
                                query_posts($args);
                                while ( have_posts() ) : the_post();
                            ?>
                            <li>
                                <p class="category-list-meta"><?php if (function_exists('unspoken_posted_on')) unspoken_posted_on($postedon_data); ?></p>
                                <p class="category-list-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
                            </li>
                            <?php
                                endwhile;
                                wp_reset_query();
                            ?>
                        </ul>
                    </div>
                </div>
            </div>

 

 

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

usuń float: left; z .category-item h2 i .category-item h2 a

dodatkowo możesz dodać overflow: hidden LUB float: left i width: 100%; na .category-item

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Zaloguj się, aby skomentować

Będziesz mógł dodać komentarz po zalogowaniu się



Zaloguj się

×