I am trying to center the contents of a div so that the display is correct in IE 5,6,7 and 8, as well as FF.
<div id="YoutubeClip">
<h3>Subscribe on YouTube!</h3><br>
<ul class="gallery clearfix"><a href="http://www.someyoutubevideo.com" rel="prettyPhoto" title="Some youtube title"><img alt="some youtube title" src="youtube clip image" border="0"></a></ul>
Some youtube title
</div>
My CSS is simple:
text-align: center
As expected, this displays an image and text centered in FF.
In IE5, the image remains justified. The text is also left-aligned, with only one word per line, for example:
appears
like
this.
IE 6 has the same problem as above.
IE 7 seems to have the same problem, but when I put the border around the div, the content overflows the border.
IE8 displays correct display
Any help on this would be great. I am trying to learn CSS better, and I have not yet been able to understand the intricacies of this problem.