FlexSlider icon indicating copy to clipboard operation
FlexSlider copied to clipboard

Images not centered when they reach they're full width and height

Open heyhemp opened this issue 14 years ago • 2 comments

I'm guessing the desired behavior would be for the images to be centered, but once the browser viewport becomes larger than the image, the images are left-aligned.

Examples:

http://davehe.mp/Dc7L http://davehe.mp/2i2q

heyhemp avatar Jul 19 '12 15:07 heyhemp

You need something be centered, most likely your parent container:

.your-container {width: 960px; margin: 0 auto;}

or center the images in your slides if they are spanning the full width:

.flexslider img {margin: 0 auto; display: block;}

tylernotfound avatar Jul 19 '12 16:07 tylernotfound

@mbmufffin Exactly. I add this by default to my flexslider css:

.flexslider img { margin: 0 auto; }

but it would seem to me that people don't realize this behavior on a lot of sites, can't test for it anyways because of their limited resolution, and expect that it would be centered by default. :)

heyhemp avatar Jul 19 '12 16:07 heyhemp