jquery - First image on a Nivo Slider appears distorted -
i have nivo slider on site , every time reload first image on slider appears stretched height, don't know reason, defined max-height fixed value , have added
height: auto !important; .nivo-main-image
even facing same problem without solution, appreciate you'll.
here code:
**
.nivoslider { position:relative; width:100%; height:auto; overflow: hidden; } .nivoslider img { position:absolute; top:0px; left:0px; max-width: none; } .nivo-main-image { display: block !important; position: relative !important; width: 100% !important; height:auto !important; } /* if image wrapped in link */ .nivoslider a.nivo-imagelink { position:absolute; top:0px; left:0px; width:100%; height:100%; border:0; padding:0; margin:0; z-index:6; display:none; background:white; filter:alpha(opacity=0); opacity:0; } /* slices , boxes in slider */ .nivo-slice { display:block; position:relative; z-index:5; height:100%; top:0; } .nivo-box { display:block; position:absolute; z-index:5; overflow:hidden; } .nivo-box img { display:block; } /* caption styles */ .nivo-caption { position:absolute; left:0px; bottom:0px; background:#000; color:#fff; width:100%; z-index:8; padding: 5px 10px; opacity: 0.8; overflow: hidden; display: none; /* -moz-opacity: 0.8;*/ /*filter:alpha(opacity=8);*/ -webkit-box-sizing: border-box; /* safari/chrome, other webkit */ -moz-box-sizing: border-box; /* firefox, other gecko */ box-sizing: border-box; /* opera/ie 8+ */ } .nivo-caption p { padding:5px; margin:0; } .nivo-caption { display:inline !important; } .nivo-html-caption { display:none; } /* direction nav styles (e.g. next & prev) */ .nivo-directionnav { position:absolute; top:45%; z-index:9; cursor:pointer; } .nivo-prevnav { left:0px; z-index:100; } .nivo-nextnav { right:0px; z-index:100; } /* control nav styles (e.g. 1,2,3...) */ .nivo-controlnav { text-align:center; padding: 15px 0; } .nivo-controlnav { cursor:pointer; } .nivo-controlnav a.active { font-weight:bold; }
**
Comments
Post a Comment