I am attempting to set the size of an empty image to 150px
. While using float: left
works on Firefox, it does not have the same effect on Google Chrome.
Here is the HTML code:
<div>
<img src='some broken url' alt='no image'>
<br>
<img src='http://farm7.staticflickr.com/6063/6046604665_da6933bd10.jpg'>
</div>
Here is the corresponding CSS:
div {
width: 450px;
height: 500px;
background: cyan;
}
img {
display: block;
max-width: 100%;
min-height: 150px;
min-width: 150px;
background: grey;
}
Is there a workaround in CSS for this issue?
I believe there may be some confusion. The image sources are meant to be random URLs that I would not know beforehand.