Quick Javascript question

Discussion in 'JavaScript' started by footballbob06, Jul 8, 2012.

  1. #1
    		    if($width != '' || $height != ''){
    		    	if (get_the_post_thumbnail( $post->ID, array($width,$height),""  ) == '') { $ftrdimg = '<img src="'.get_template_directory_uri().'/images/slideshow/noftrdimg-1006x250.jpg" />'; } else { $ftrdimg = get_the_post_thumbnail( $post->ID, array($width,$height),"class={$reflect}" ); }
    		    } else {
    		    	if (get_the_post_thumbnail( $post->ID, array(756,250),""  ) == '') { $ftrdimg = '<img src="'.get_template_directory_uri().'/images/slideshow/noftrdimg.jpg" />'; } else { $ftrdimg = get_the_post_thumbnail( $post->ID, array(756,250),"class={$reflect}"  ); }
    		    }
    		    
    			$tmp .='	<a class="reflect" href="'.$url.'">'.$ftrdimg.'</a>'. chr(13);
    Code (markup):
    Here is just a little piece of what I got. It is a slider on the front page of my wordpress site. When there is a post with a featured picture it picks it and if not there is just a picture that says no picture on this post. The problem I am having is that when there is a picture that is small it is showing up left justified in the viewer slider thing. If it is a large picture no problem it takes up the whole slider if not its left justified. I am just trying to get these pictures to be centered in the viewer. Is this possible with what I have here? If there is anymore info you need let me know.
    Thanks
     
    footballbob06, Jul 8, 2012 IP
  2. Unni krishnan

    Unni krishnan Peon

    Messages:
    237
    Likes Received:
    9
    Best Answers:
    2
    Trophy Points:
    0
    #2
    This has to do more with wordpress rather than javascript.
    Try posting in wordpress forum.
     
    Unni krishnan, Jul 8, 2012 IP