html - How to make an image center itself when size of the div is increased -


i struggling fix image popup window , problem image getting stretched whole div ,

the div applying getting width , height jquery. html

<div id="portfolio-detail" style="width: 745px; height: 655px; top: 22px; display: block;">     <img class="portfolio-close" src="assets/images/cancel-button.png">     <div class="viewimg" style="position:relative;display:block;width:100%;height:100%;margin-left:auto;margin-right:auto;margin:0 ;">          <img class="folioimg" style="position:absolute;width:100%" data-foliothumb="1" src="assets/gallery_crop_1.jpg">---&gt;</div> </div> 

the css

.about-slider-container {   top: 0;   left: 0;   right: 0;   bottom: 0;   padding: 25px;   z-index: 100; }  #portfolio-detail {   position: absolute;   width: 100%;   height: 100%;   background: rgba(0,0,0,0.9);   z-index: 9999; } 

try add position .about-slider-container.

.about-slider-container {   position: relative; //or suits   top: 0;   left: 0;   right: 0;   bottom: 0;   padding: 25px;   z-index: 100; }  #portfolio-detail {   position: absolute;   width: 100%;   height: 100%;   background: rgba(0,0,0,0.9);   z-index: 9999; } 

Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -