I’ve checked all over the net and in this forum with search but I can’t find an answer. It seems like I’m using vertical-align right in my css but it’s just not working. Here is my css:
Is there some issue with my models class that is interfering? Or am I using align the wrong way? Sorry if this seems like a dumb question but I can’t figure it out.
I figured out that valign only applies to text with an image. What I want to do is center the image vertically inside the div tag. I’m out of ideas obviously.
yes that’s true. normally, unless instructed otherwise, I would use js to set the top margin for the relevent images which means that javascript disabled browsers would still see the images, but they wouldn’t be centered vertically.
btw - I copied and pasted your code and ran it in my IE8. the image is centered horizontally but not vertically.
I don’t have the original file anymore, but I just recopied and pasted your code and this time opened it on my xampp local server in IE8 and the image centres horizontally and vertically.
but I do know that when I first tried it earlier in IE8 I didn’t open the file on my xampp. I just double clicked the html file and it opened in my IE8. I suspect now that I most probably didn’t copy and paste it correctly.
Hack,hack, cough. Speak for yourself. The number of my errors is equal to the number of times I have been falling down drunk; none, that I can remember.