damiancds Posted April 9, 2010 Share Posted April 9, 2010 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 More sharing options...
jeffman Posted April 9, 2010 Share Posted April 9, 2010 An img tag accepts width and height attributes for just this reason. You can also use CSS, which is the preferred solution. Link to comment Share on other sites More sharing options...
damiancds Posted April 9, 2010 Author Share Posted April 9, 2010 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 More sharing options...
jeffman Posted April 9, 2010 Share Posted April 9, 2010 Wow. I'm getting the same result, even in a very simple test document. These techniques used to work. Maybe I'm missing something. Sorry. Link to comment Share on other sites More sharing options...
damiancds Posted April 13, 2010 Author Share Posted April 13, 2010 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.