|  |  | 
          
            | เราจะปรับรูปให้มันใหญ่ขึ้นดูสดุดตา และดูดีขึ้นน่ะครับ จากเวป
 
 http://www.11fu.co.cc/
 
 ขอบพระคุณเป็นอย่างสูครับ
 
 
 
 โค๊ด php
 Code (PHP)
 
 <?php
/**
 * The featured slider on the home page
 *
 */
?>
<?php if (get_option('cp_enable_featured') <> 'no'): ?>
    <?php query_posts(array('post__in' => get_option('sticky_posts'), 'post_type' => 'ad_listing', 'post_status' => 'publish', 'orderby' => 'rand')); ?>
        <?php if (have_posts()) : ?>
        <!-- featured listings -->
        <div class="shadowblock_out">
            <div class="shadowblockdir">
                <h2 class="dotted"><?php _e('โฆษณาสดุดตา  ที่สไลค์สินค้าแนะนำ', 'appthemes')?></h2>
                <div class="sliderblockdir">
                    <div id="list">
                        <div class="prev"><img src="<?php bloginfo('template_url'); ?>/images/prev.jpg" alt="" /></div>
                        <div class="slider">
                            <ul>
                                <?php while (have_posts()) : the_post(); ?>
                                    <li>
                                        <span class="feat_left">
											<?php if(get_option('cp_ad_images') == 'yes') cp_ad_featured_thumbnail(); ?>
											
											<div class="clr"></div>
											<span class="price_sm"><?php if(get_post_meta($post->ID, 'price', true)) cp_get_price_legacy($post->ID); else cp_get_price($post->ID); ?></span>
										</span>
                                        <p><a href="<?php the_permalink() ?>"><?php if (mb_strlen(get_the_title()) >= get_option('cp_featured_trim')) echo mb_substr(get_the_title(), 0, get_option('cp_featured_trim')).'...'; else the_title(); ?></a></p>
                                    </li>
                                <?php endwhile; ?>
                            </ul>
                        </div>
                        <div class="next"><img src="<?php bloginfo('template_url'); ?>/images/next.jpg" alt="" /></div>
                    </div><!-- /slider -->
                    <div class="clr"></div>
                </div><!-- /sliderblock -->
            </div><!-- /shadowblock -->
        </div><!-- /shadowblock_out -->
        <?php endif; ?>
        <?php wp_reset_query(); ?>
<?php endif; // end feature ad slider check ?>
 โค๊ด css
 Code (C#)
 
 /* featured listings homepage carousel */
#list { width:907px;  margin:0 auto; height:85px;}
.slider { float:left;  left:-5000px;  margin-left:15px;  position:relative; height: 88px; /* visibility:hidden; */}
.slider ul { height:70px;  width:600px}
.slider ul li { padding:5px 15px;  height:70px;  width:140px}
.slider ul li a {text-decoration:none; font-weight:bold;}
.slider ul li a:hover {text-decoration:underline}
.slider ul li:hover { background-color:#F2F2F2; -khtml-border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; text-shadow:0 1px 0 #fff;}
.slider ul li img { cursor:pointer;}
span.price_sm { font-size:11px;  font-style:italic;  color:#666}
span.feat_left { float:left; text-align:center; width:55px; }
span.feat_left a.preview img:hover {opacity:0.6;}
#list li p {display:block; margin:0 0 0 62px; text-shadow:0 1px 0 #fff;white-space: pre-wrap; white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* Internet Explorer 5.5+ */}
span.feat_left img.preview { border:1px solid #CCC;  float:left;  margin:3px 10px 0 0; padding:2px; -moz-box-shadow: 1px 1px 4px #dbdbdb; -webkit-box-shadow: 1px 1px 4px #b7b7b7; box-shadow: 1px 1px 4px #b7b7b7; -khtml-border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px;}
.prev { cursor:pointer;  float:left; padding-top:25px}
div.prev img:hover, div.next img:hover {opacity:0.6;}
.next { cursor:pointer;  float:right; padding-top:25px}
 
 
 Tag : PHP, HTML/CSS, CakePHP
 
 
 |  
            |  |  
            | 
              
                |  |  |  |  
                |  | 
                    
                      | Date :
                          2011-04-10 13:25:15 | By :
                          jittapan | View :
                          896 | Reply :
                          1 |  |  |  
                |  |  |  |  |  
            |  |  
		            |  |