Jump to content

keeping the size of an image if it won't load


damiancds

Recommended Posts

I don't know if it's possible but, I'd like it so that if an image doesn't load (ie the source doesn't exist) then the page still have an empty box where the image would've been (with the alt text in the box) because when an image doesn't load, it messes up my formatting. (like in a gallery and the middle image doesn't load, the containers sometimes stretch and the images after it aren't aligned in their rows.EDIT:Or, is this pretty much browser dependent, where one browser displays a missing image differently than another browser?

Link to comment
Share on other sites

I actually am using css,my html code is (simplified of course):

<div class="recipe_card"><div class="recipe_card_title">Cauliflower Center Meatloaf</div><br><img src="/Resources/Images/Recipes/LG/x.jpg"></div>

and my css code is:

div.recipe_card{  padding: auto;  height: auto;  text-align: center;  border: 1px solid black;}div.recipe_card img{  border: 1px solid black;  margin: 2px;  margin-top: 6px;  margin-bottom: 6px;  width: 400px;  height: 250px;}

which gives me this result

Link to comment
Share on other sites

At first, as in when the page is first loaded, (probably better if it's not cached so it's easier to see) but the image does have it's box only when it's done loading, it shrinks it back down to nothing,right now, it's not too big a deal, (I really shouldn't have any missing images) it was just for when I was filling pages, it helped to keep order.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...