Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8780829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:09:12+00:00 2026-06-13T20:09:12+00:00

I have flexslider set up on a responsive site. The slider I am creating

  • 0

I have flexslider set up on a responsive site. The slider I am creating takes both landscape and portrait orientation images. I have smoothHeight: true set so the height adjusts to fit the images.

At the largest media query the flexslider container is 750px wide. This is fine for landscape orientation images but portrait orientation images become way too big. The width of the portrait image gets set to same size as the container – 750px wide, and so the height is at least double that and so you cannot view the whole image without scrolling.

In the css I tried setting max-height: 750px which solves the height problem but flexslider then stretches the image to fit 750px wide by 750px high.

Does anyone know of any way to get flexslider to preserve the aspect ratio and adjust the width of the image based on the max-height? So that the portrait images would be 750px high but maintain their aspect ratio.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:09:14+00:00Added an answer on June 13, 2026 at 8:09 pm

    I Don`t understand about which functionality of Flexslider you talking – on zooming image or that thumbnails in scrolled toolbar?
    Whatever, there is one solution for both situations:

    <style>
    figure {
        outline: green solid 1px;
        padding: 2px;
    }
    img {
        width: 100%;
        height: 100%;
        display: block;
        position: relative;
    
        outline: red solid 1px;
        opacity: .5;
    }
    .scale img{
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        margin: 0 auto;
        vertical-align: middle;
    }
    .toheight img{
        max-width: none;
    }
    </style>
    <figure class="scale toheight" width="200" height="200">
        <img src="http://placekitten.com/250/300"/>
    </figure>
    

    Solution for crop or scale image within container http://jsfiddle.net/iegik/ZzXru/

    Related question: How to align cropped element horizontally?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a vanilla flexslider installation on my site. The slider operates by cycling
I have 2 flexsliders on 1 site. Both have different IDs, both have a
Have finally got a responsive site working (of a fashion). What I want to
I have a FlexSlider (new version) with fade effect between each slide. The slider
I have a problem with my responsive flexslider plugin. The plugin works fine unless
I'm effectively trying to have the FlexSlider be hidden, except for some controlling thumbnails.
Have such user_session model: class UserSession < Authlogic::Session::Base logout_on_timeout true # default if false
I have been developing my first mobile site with jQuery Mobile and you can
I have a 3x3 matrix of 9 images built with Susy. I only wondered
So I have been attempting to integrate captions and links into the Envato FlexSlider

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.