Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird resizing for thumbnails images with height and weight attributes in IE #13251

Closed
alienlebarge opened this issue Apr 1, 2014 · 4 comments
Labels

Comments

@alienlebarge
Copy link
Contributor

Our CMS can't get ride on the height and weight img attributs.
The problem is if we have an image in a .thumbnail class, IE8 do some weird resizing.

<!-- container -->
<div class="container">
  <!-- row -->
  <div class="row">

    <div class="col-md-4">
      <figure>
        <a href="" class="thumbnail">
          <img src="http://placekitten.com/g/500/300" alt="" width="500" height="300" />
          <figcaption>Cute kitty</figcaption>
         </a>
      </figure>
    </div>

    <div class="col-md-8">...</div>

  </div><!-- /.row -->
</div><!-- /.container -->

For now, I've done the following quickfix

.thumbnail > img {
  width: inherit;
}

It can be good to add this property to the .img-responsive mixin.

I can do a pull request. But before, I just wanted to know if it can produce unwanted effects.

@cvrebert cvrebert added the css label Apr 1, 2014
@cvrebert cvrebert changed the title Weird resizing for thumbnails images with height and weight attributs in IE Weird resizing for thumbnails images with height and weight attributes in IE Apr 1, 2014
@cvrebert
Copy link
Collaborator

cvrebert commented Apr 1, 2014

Please post your example of the problem as a CodePen, JS Fiddle, or JS Bin.

@alienlebarge
Copy link
Contributor Author

Since it's a pain to use respond.js with online editors, here's a gist wich reproduce the problem.

@mdo
Copy link
Member

mdo commented Apr 2, 2014

Why is your image getting those fixed dimensions if you're just overriding them anyway? The .thumbnail is setting a max-width so that the image is contained within the parent. Change your image attributes, override the max-width, or set a custom width that works for this use case.

@mdo mdo closed this as completed Apr 2, 2014
@alienlebarge
Copy link
Contributor Author

I know that. It's just I work with a CMS (TYPO3 4.7.x) from the IE8 era that can't generate img without height& width.

At least, the workaround is now documented for people who works with prehistorical browser 👴.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants