[resolved] Internet Explorer messing up Formatting (6 posts)

  1. Indyan
    Posted 9 years ago #

    I use div align="center" to centre images and other objects.
    However, internet explorer ( i tried it on v7) seems to be ignoring the closing of tag. So, entire webpage formatting is getting messed up.

    Example : http://www.pallab.net/2007/05/28/ten-things-you-can-do-with-irfanview/
    Or http://www.pallab.net/2007/05/29/email-bankruptcy-a-growing-reality/

    Sample code :
    <div align="center"><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/AKabY1iPaBQ"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/AKabY1iPaBQ" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></div>
    Opera and firefox renders it properly. What am I doing wrong?

  2. DE
    Posted 9 years ago #

    It's cleaner if you put the align in your css file
    or you could also try
    <div style='margin: auto; text-align: center;'>
    margin: auto centers your content,
    text-align: center also makes this work in IE

    Also google for embedd and object.
    W3C and IE have a different idea as to how you should embedd flash and youtube stuff in a page. Believe Alistapart also wrote some articles about it.

    hope this helped


  3. DE
    Posted 9 years ago #

    also might wanna install webdevelopper plugin for firefox from http://chrispederick.com/work/web-developer/
    Once installed, under the 'tools' option choose validate html. You'll notice that your page doesn't validate due to a link tag that isn't closed,...


  4. whooami
    Posted 9 years ago #

    do this instead:

    <object class="movie" type="application/x-shockwave-flash" style="width:425px; height:350px;" data="http://www.youtube.com/v/AKabY1iPaBQ"><param name="movie" value="http://www.youtube.com/v/AKabY1iPaBQ" /><param name="wmode" value="transparent" /></object>

    then center the movie or whatever using CSS:

    .movie {
            margin-bottom: 10px;
    	padding: 4px;
    	border: 1px solid #ff0000;
  5. whooami
    Posted 9 years ago #

    Note that Ive removed the embed tags -- you dont need them. Using the code above will display youtube movies in all browsers that have the latest flash installed.

  6. Indyan
    Posted 9 years ago #

    W3C Validator revealed the mistake I had made.
    I had forgot to close a center tag.
    Thanks for the help.

Topic Closed

This topic has been closed to new replies.

About this Topic