AUTHOR: Veselina Raykova
DATE POSTED: September 12, 2018
Keeping the image ratio when resizing the browser window is useful in scenarios when you want to show a banner-like gallery on the top of the page.
As the designed behavior of RadImageGallery is to resize the width of the image depending on the height (but not th vice versa), we will need to modify both the CSS and client-side resizing logic of the control in order to resize its height:
html, body, form {
margin
:
0px
!important
; }
.rigItemBox {
width
100%
.RadImageGallery {
background-color
transparent
.rigToolbar {
display
none
.rigActiveImage img {
padding
;
height
auto
var $ = $telerik.$;
function pageLoad() {
$(
".rigItemBox"
).height($telerik.$(
".rigActiveImage img"
).height());
$find(
'<%=RadImageGallery1.ClientID%>'
).playSlideshow();
$(window).on(
'resize'
, function () {
});
}
Resources Buy Try