Guest User

Untitled

a guest
Jul 14th, 2012
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. <div id="featured-scrollable">
  2. <div class="scrollable">
  3. <h3>Featured Posts</h3>
  4. <div class="items">
  5. <?php $counter = 0; $perslide = 6; ?>
  6. <div class="scrollable-item">
  7. <?php $my_query = new WP_Query('category_name=Featured&posts_per_page=9');
  8. while ($my_query->have_posts()) : $my_query->the_post();
  9. $do_not_duplicate[] = $post->ID;
  10. if ($counter++ > $perslide) { $counter = 1; ?></div><div class="scrollable-item"><?php } ?>
  11. <div class="item">
  12. <?php if (has_post_thumbnail()) : the_post_thumbnail('featuredposts-thumbnail'); endif; ?>
  13. <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
  14. </div>
  15. <?php endwhile; ?>
  16. </div>
  17. </div>
  18. </div>
  19.  
  20. /* SCROLLABLE FEATURED */
  21. .scrollable {
  22. position: relative;
  23. overflow: hidden;
  24. width: 970px;
  25. height: 265px;
  26. }
  27. .scrollable .items {
  28. width: 2000em; /* Must be large, but not too large */
  29. position: absolute;
  30. clear: both;
  31. margin-top:20px;
  32. }
  33. .items div.scrollable-item {
  34. float: left;
  35. width: 1020px;
  36. margin-top: 8px;
  37. }
  38.  
  39. #featured-scrollable {
  40. background-color: #ffffff;
  41. border: 1px solid #dadcde;
  42. padding: 15px;
  43. margin-bottom: 20px;
  44. }
  45. #featured-scrollable h3 {
  46. font-family: Arial, Verdana, sans-serif;
  47. font-size: 18px;
  48. color: #4f5051;
  49. float: left;
  50. }
  51. #featured-scrollable .items div.scrollable-item .item { float: left; width: 140px; margin: 0 11px; height: 155px; }
  52. #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; }
  53. #featured-scrollable .items div.scrollable-item .scrollable-postthumbnail { width: 140px; }
  54. #featured-scrollable .items div.scrollable-item .item h2 { padding-top: 2px; font-size: 13px; }
  55. #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;}
  56. #featured-scrollable .featured-scrollable-nav {
  57. display: block;
  58. width: 100px;
  59. margin: 15px auto 0 auto;
  60. padding-left: 35px;
  61. }
  62. #featured-scrollable .featured-scrollable-nav a {
  63. cursor: pointer;
  64. margin-right: 10px;
  65. background: url("images/slider-arrows.png") no-repeat 0 0;
  66. font-size: 1px;
  67. display: block;
  68. height: 30px;
  69. width: 30px;
  70. float: left;
  71. }
  72. #featured-scrollable .featured-scrollable-nav a.right { background-position: 0 -30px; margin-right: 0; }
  73. #featured-scrollable .featured-scrollable-nav a.disabled { visibility: hidden; }
  74. #featured-scrollable .featured-scrollable-nav a.left:hover { background-position: -30px 0; }
  75. #featured-scrollable .featured-scrollable-nav a.right:hover { background-position: -30px -30px; }
Advertisement
Add Comment
Please, Sign In to add comment