Mix Austria
Mix Austria

Reputation: 935

How to put border in a dynamic img tag?

I need to put a border on my img tag. Here is my HTML.

<div class="col-md-12">
  <div class="row col-md-6">
    <img class="img-responsive center-block" src="{{design.img_url_front}}" border="5">
  </div>
  <div class="row col-md-6">
    <img class="img-responsive center-block" src="{{design.img_url_back}}">
  </div>
</div>

I also tried in CSS

img {
  border: 5px;
}

Still no luck.enter image description here

As you can see, I need the border around the blue part. How can I make it work? Please help.

Upvotes: 0

Views: 152

Answers (2)

jigar gala
jigar gala

Reputation: 1650

You forgot to provide color,

try

img{
  border: 5px solid blue;
}

Upvotes: 1

Gokul P P
Gokul P P

Reputation: 962

Add border to the class .img-responsive .center-block

.img-responsive .center-block{
    border: 5px solid #000;
}

Upvotes: 2

Related Questions