Bootstrap carousel image size problems

374
November 21, 2016, at 10:14 PM

I want to do an image gallery. I'm using this http://www.bootply.com/79859 but I have a problem because I don't know the image's sizes. The first image can be in 1800 x 400 the second 500x500 etc...

How can I do to set a max size and keep the image dimension 100% ?

Answer 1

Have you tried playing with the slider div's background-size css property? I would try using background-size:cover to make smaller images fit a larger div, and possibly background-size:contain for larger images. I think the attribute contain is what you're looking for - here's a w3schools example.

You can also set the height/width of the image like background-size:10px 20px; (height width). One thing to keep in mind with the images is the aspect ratio of height x width. I assume what you meant by image dimensions at 100% was keeping this ratio the same so the images did not skew.

READ ALSO
angular-wizard: Can't use “external scripts” like jQuery UI for example, it does not work

angular-wizard: Can't use “external scripts” like jQuery UI for example, it does not work

So i'm using this module:[nnn]github. com/mgonto/angular-wizard [nnn]to make a step-by-step form on my application, everything was working fine till i tried to use a datepicker.

230
Bootstrap 3 - Month Calendar inside grid column

Bootstrap 3 - Month Calendar inside grid column

I need embeding a calendar months, inside of column grid bootstrap. There are some libreries for make it? (if is posible, must to be customizable).

142
Chart js PHP and JSON wont diplsay

Chart js PHP and JSON wont diplsay

I am trying to get JSON through PHP. This is successful since the console display the json objects.

191
Find the Least count number and then divide that number to specific remaing

Find the Least count number and then divide that number to specific remaing

I am trying to check each value of text box value as a localstorage id and get the specifiv value of that id and then check that value is equal to or greater then a specific value in my example the value local storage's Total_thrisholdvalue1 value.

166