Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="featured-scrollable">
- <div class="scrollable">
- <h3>Featured Posts</h3>
- <div class="items">
- <?php $counter = 0; $perslide = 6; ?>
- <div class="scrollable-item">
- <?php $my_query = new WP_Query('category_name=Featured&posts_per_page=9');
- while ($my_query->have_posts()) : $my_query->the_post();
- $do_not_duplicate[] = $post->ID;
- if ($counter++ > $perslide) { $counter = 1; ?></div><div class="scrollable-item"><?php } ?>
- <div class="item">
- <?php if (has_post_thumbnail()) : the_post_thumbnail('featuredposts-thumbnail'); endif; ?>
- <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
- </div>
- <?php endwhile; ?>
- </div>
- </div>
- </div>
- /* SCROLLABLE FEATURED */
- .scrollable {
- position: relative;
- overflow: hidden;
- width: 970px;
- height: 265px;
- }
- .scrollable .items {
- width: 2000em; /* Must be large, but not too large */
- position: absolute;
- clear: both;
- margin-top:20px;
- }
- .items div.scrollable-item {
- float: left;
- width: 1020px;
- margin-top: 8px;
- }
- #featured-scrollable {
- background-color: #ffffff;
- border: 1px solid #dadcde;
- padding: 15px;
- margin-bottom: 20px;
- }
- #featured-scrollable h3 {
- font-family: Arial, Verdana, sans-serif;
- font-size: 18px;
- color: #4f5051;
- float: left;
- }
- #featured-scrollable .items div.scrollable-item .item { float: left; width: 140px; margin: 0 11px; height: 155px; }
- #featured-scrollable .items div.scrollable-item .item img { margin: 0 0 10px; border: 1px solid #CCC; border-radius: 4px 4px 4px 4px; padding: 4px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);min-width:135px;min-height:100px; }
- #featured-scrollable .items div.scrollable-item .scrollable-postthumbnail { width: 140px; }
- #featured-scrollable .items div.scrollable-item .item h2 { padding-top: 2px; font-size: 13px; }
- #featured-scrollable .items div.scrollable-item .item h2 a{text-decoration:none; font:12px/140% Georgia, "Times New Roman", Times, serif; color:black; text-align:center; font-size:16px;}
- #featured-scrollable .featured-scrollable-nav {
- display: block;
- width: 100px;
- margin: 15px auto 0 auto;
- padding-left: 35px;
- }
- #featured-scrollable .featured-scrollable-nav a {
- cursor: pointer;
- margin-right: 10px;
- background: url("images/slider-arrows.png") no-repeat 0 0;
- font-size: 1px;
- display: block;
- height: 30px;
- width: 30px;
- float: left;
- }
- #featured-scrollable .featured-scrollable-nav a.right { background-position: 0 -30px; margin-right: 0; }
- #featured-scrollable .featured-scrollable-nav a.disabled { visibility: hidden; }
- #featured-scrollable .featured-scrollable-nav a.left:hover { background-position: -30px 0; }
- #featured-scrollable .featured-scrollable-nav a.right:hover { background-position: -30px -30px; }
Advertisement
Add Comment
Please, Sign In to add comment