• Resolved krvz

    (@krvz)


    Strange problem I’m having. I’m using the Visio theme with wp e-commerce plugin. Anyway, I skinned a widget that is provided through wp e-commerce so it displays two rows of thumbnails instead of one. It worked fine on a test blog (here) but didn’t work on the real site (here), seems that the CSS isn’t being applied (ie, I can change the padding with no effect on the real site). php and CSS are below, any ideas? Thanks in advance!

      CSS

    div#sidebar div. item_image_right img {
    float:right;
    border:medium none;
    max-width:none !important;
    padding:100px 0pt 0pt 2px;
    }

    div#sidebar div. item_image_left img {

    border:medium none;
    max-width:none !important;
    padding:100px 0pt 0pt 20px;
    }

      php
    function nzshpcrt_latest_product($input = null) {
    	global $wpdb;
    
    	$siteurl = get_option('siteurl');
    	$latest_product = $wpdb->get_results("SELECT * FROM <code>&quot;.WPSC_TABLE_PRODUCT_LIST.&quot;</code> WHERE <code>active</code> IN ('1') ORDER BY <code>id</code> DESC LIMIT 10", ARRAY_A);
    	if($latest_product != null) {
    		$output = "<div>";
    
    $count = 0; 
    
    			foreach($latest_product as $special) {			
    
    if($count % 2 == 0){
    
    $output.="<div>";
    			$output.="<div class='item_image_right'>";
     			$output.="<a href='".wpsc_product_url($special['id'],$special['category'])."'>";
    			if(($special['image'] > 0)) {
    
    				if(get_option('wpsc_selected_theme') == 'marketplace') {
    					$src = WPSC_IMAGE_URL.$special['image'];
    
    					$output .= "				<img src='". "index.php?image_id={$special['image']}&width=100&height=75' title='".$special['name']."' alt='".$special['name']."' />";
    
    				} else 	{
    					$output .= "			<img src='". "index.php?image_id={$special['image']}&width=75&height=75'/>  ";
    
    }
    			} else {
    				//$output .= "<img src='$siteurl/wp-content/plugins/wp-shopping-cart/no-image-uploaded.gif' /><br />";
    			}
    
     			$output.="		</a>";
    			$output .= "	</div>";
    
    			$output .= "	</a>";
    			$output .= "</div>";
    
    $count++;
    }
    
    else{
    $count++; 
    
    			$output.="<div>";
    			$output .= "	<div class='item_image_left'>";
     			$output.="			<a href='".wpsc_product_url($special['id'],$special['category'])."'>";
    			if(($special['image'] > 0)) {
    
    				if(get_option('wpsc_selected_theme') == 'marketplace') {
    					$src = WPSC_IMAGE_URL.$special['image'];
    
    					$output .= "				<img src='". "index.php?image_id={$special['image']}&width=100&height=75' title='".$special['name']."' alt='".$special['name']."' />";
    
    				} else 	{
    					$output .= "			<img src='". "index.php?image_id={$special['image']}&width=75&height=75' title='".$special['name']."' alt='".$special['name']."' />  ";
    
    }
    			} else {
    				//$output .= "<img src='$siteurl/wp-content/plugins/wp-shopping-cart/no-image-uploaded.gif' title='".$special['name']."' alt='".$special['name']."' /><br />";
    			}
    
     			$output.="		</a>";
    			$output .= "	</div>";
    
    			$output .= "	</a>";
    			$output .= "</div>";
    		}
    }
    
    		$output .= "</div>";
    	} else {
    		$output = '';
    	}
    
    	echo $input.$output;
    
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • Pls show the real site URL if possible.

    Thread Starter krvz

    (@krvz)

    Crap, had thought I linked it, sorry.

    Real site is: http://artistsforhope.org/
    Test site is: http://foreveryoungoriginals.com/testblog/

    Thanks!

    In the real site, there is only div.item_image.

    Change div.item_image in the real site to div.item_image_left or div.item_image_right.

    Thread Starter krvz

    (@krvz)

    I had forgotten that I had changed it back while experimenting. I re-added the code you mentioned and am able to separate the images by the loop (you can see that half are sized differently to prove the logic is working). However, I still can’t understand why the CSS isn’t being applied. I made sure the different items were still in the CSS file (see below). Thanks for helping me!

    div#sidebar div.item_image_left img {
    border:medium none;
    max-width:none !important;
    padding:2px 0px 0px 2px;
    }

    div#sidebar div.item_image_right img {
    float:right;
    border:medium none;
    max-width:none !important;
    padding:2px 0px 0px 2px;
    }

    Thread Starter krvz

    (@krvz)

    Got it! Found out that my css was being stored in a different folder than the test blog. Strange. End result here. Thanks again!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problems with CSS’ is closed to new replies.