Image Height Width Problem

holtkinshasa

New Member
How to change image resolution using jQuery.I have applied a image on body background using css/php. Now I want to apply screen height and width to the image, so image displays in full windows.Actuly i haven't use repeat style.Used Code Is:\[code\] <style type="text/css"> <?php global $post; if ( has_post_thumbnail($post->ID) ) { $image_id = get_post_thumbnail_id($post->ID); $bg_src = http://stackoverflow.com/questions/3736148/wp_get_attachment_image_src( $image_id,'full'); ?> body { background: #000000 url("<?php echo $bg_src[0]; ?>") no-repeat center top fixed !important; } <?php } else { ?> body { background: #000000 url("<?php bloginfo('template_directory') ?>/img/bg_img.jpg") no-repeat center top fixed ; } <?php } ?> </style> \[/code\]I get the screen height and width using this we not able to understand what to implement it on that Image.\[code\]var p_browserHeight= screen.height; var p_browserWidth= screen.width; jQuery('body.archive').css('height',p_browserHeight+'px' ); jQuery('body.archive').css('width',p_browserWidth+'px' );\[/code\]
 
Back
Top