herrjeh42
herrjeh42

Reputation: 2793

How can I disable shrinking/resiziing images in Twitter Bootstrap?

I have the following set-up

I want to show small images (32x32 pixel):

<img src="/img/icon_line.png" class="img-polaroid" width="32" height="32" />

What happens is that they got shrinked to tiny size through the following css rule in bootstrap.css:

img {
  width: auto\9;
  height: auto;
  max-width: 100%;
  vertical-align: middle;
  border: 0;
  -ms-interpolation-mode: bicubic;
}

How can I avoid this and show the icons in full size in my layer?

Update: I figured out that this occurs when the images are in a table and the table rows have much text inside and everything is in a layer.

Here is a simplified example of my use case:

Fixed version:

Upvotes: 0

Views: 2892

Answers (1)

Alex  Zhdanov
Alex Zhdanov

Reputation: 521

Use for table cell with image next code:

<td class="span1">
     <img src="img/icon_line.png" class="img-polaroid" alt="Ligne">
</td>

Upvotes: 1

Related Questions