Full Width Slider Images

This topic contains 4 replies, has 2 voices, and was last updated by  Alex Rollin 6 years, 1 month ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #420676

    filmgeorgia
    Free User
    Post count: 4

    I am having a time with the CSS slider.

    I want a full-width slider across the top of the listings page. I want it 500px deep and I want the image to fill the entire area proportionally. (Yeah, it will crop some images which is fine.) You all have suggested the width at 100% for the img in another post but all that does is stretch the image in one direction.

    
    
    .geodir-listing-slider-widget {height: 500px;}
    
    .geodir_flexslider .geodir-slides img {width: 100%;}
    
    .geodir-slider-title {font-size: 24px; background: #f47a20;}
    
    #geodir_widget_carousel.geodir_flexslider.flexslider-ltr {display: none;}

    With this, I get a 500px deep widget area with an orange bar and larger font with the thumbnail previews hidden. Totally digging all that until it gets to the actual image for the slider and I get a 200px high, 100% wide distorted image. I have played with the auto functions for width and height only for them to do nothing.

    I am trying my best to wrap my head around this CSS and am using the developer tools in Chrome to experiment but I am at a loss with this bit.

    By the way, this would be a great feature for the slider widget in the future. Much like your full-width map does, have it be full-width and then give the option of the height. Have the images cover the area. It would certainly be a selling point for getting people to upgrade to featured listings to be part of a full-width slider.

    Thanks!

    #420680

    filmgeorgia
    Free User
    Post count: 4

    This is what that code is doing. I am struggling to get the entire photo to stretch proportionately.

    I am planning on curating the photos for the featured listings to make sure the customers have the best versions. This particular example is of a landscape photo.

    #420690

    filmgeorgia
    Free User
    Post count: 4

    I think I got it. This gives me proportional sizing that covers the entire area and centers the photo. Looks good for the horizontal photos but looks like crap for square logos. Definitely going to have to curate the photos for the best look. (Featured listings will have separate logo areas. So, hopefully, the featured photo will be a an actual photo.)

    Just out of curiosity, does using the ID for these stop these styles from being used on the slider elsewhere? (Sorry for the CSS newb question.)

    
    
    #listing_slider_view-9 .geodir-listing-slider-widget {height: 500px;}
    
    #listing_slider_view-9 .geodir_flexslider .geodir-slides img {width: 100%; max-height: 100% !important; object-fit: cover;}
    
    #listing_slider_view-9 .geodir-slider-title {font-size: 24px; background: #f47a20;}
    
    #listing_slider_view-9 #geodir_widget_carousel.geodir_flexslider.flexslider-ltr {display: none;}
    #420691

    filmgeorgia
    Free User
    Post count: 4

    To add to the wish list for the slider, it would be totally sweet to have it use current viewing post type like the list widgets do. I either have to pick a post type or use all for all the listings pages. Right now, I have businesses and events and would prefer only the current post type show up on the slider.

    Thanks!

    PS- I know this is an entire thread of me talking to myself. Hope it helps someone else out.

    #420709

    Alex Rollin
    Moderator
    Post count: 27815

    Hey! Glad you got it working for you, and thanks for sharing what you came up with.

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket