Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
Herst edited this page Aug 18, 2019 · 2 revisions

E045

Bootlint v0.x

.img-responsive should only be used on <img>s

The .img-responsive class is only meant for use on <img> elements. Using it on other elements is nonsensical.

Wrong:

<div class="img-responsive">
  <img src="foo.jpg" />
</div>

Right:

<div>
  <img src="foo.jpg" class="img-responsive" />
</div>

Bootlint v1.x (Bootlint for Bootstrap v4 and newer)

.img-fluid should only be used on <img>s

The .img-fluid class is only meant for use on <img> elements. Using it on other elements is nonsensical.

Wrong:

<div class="img-fluid">
  <img src="foo.jpg" />
</div>

Right:

<div>
  <img src="foo.jpg" class="img-fluid" />
</div>
Clone this wiki locally