Answer the question
In order to leave comments, you need to log in
Why is the image not showing in the img tag?
In general, the problem is this:
There is such a code:
<a href="" data-toggle="modal" data-target="#myModal"><img src="images/small/2016042513164195.jpg" ></img> <br></a>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-belledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body"> <img src= "images/big/2016042513164147.jpg"></img>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Закрыть</button>
</div>
</div>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
and you try to insert an image from google - but in the modal class = "image1" and for the link class = "image" and styles - well, if it works, then you have the wrong path to the image
I already messed up something that I threw. That's all for sure now:
This is the source:
echo '<a href="" data-toggle="modal" data-target="#myModal"><img src="' .$row['small']. '" ></img></a>';?>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body"> <img src="<? echo $row['big']; ?>"></img></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" align="center">Закрыть</button>
</div>
</div>
</div>
</div>
<a href="" data-toggle="modal" data-target="#myModal"><img src="images/small/2016042513164195.jpg" ></img></a>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body"> <img src="images/big/2016042513164147.jpg"></img></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" align="center">Закрыть</button>
</div>
</div>
</div>
</div>
<img src="" ></img> - невалидно
<img src="" /> - правильно
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question