View Single Post
  #8 (permalink)  
Old Apr 22nd, 2007, 22:28
Craigj1303 Craigj1303 is offline
SuperMember

SuperMember
Join Date: Apr 2007
Location: UK
Age: 31
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Re: positioning with CSS

Version 7, on windows XP


Quote:
Originally Posted by Lchad
This isn't going to center your site in IE but I saw an unnecessary div.
Delete your #flash div and change your css of your #middlecontainer to this
Code: Select all
#middlecontainer {
    width: 700px;
    margin: 0 auto;
    background: #EFE6C5;
    text-align: left;
    }
In the html change the code around the Flash to this:
Code: Select all
<div id="middlecontainer">FLASH INFO HERE</div>
I played with your code and I have it perfectly centered in IE. The only difference between my code and yours is the javascript. Try a test run. Delete the javascript and see if it centers the design. If it does center, you know your javascript is the problem.
Quote:
<!-- following code added by server. PLEASE REMOVE -->
<script language="JavaScript" src="http://uk.geocities.com/js_source/ygNSLib9.js?v3"></script><script language="JavaScript">var yvnContents='http://geocities.yahoo.com/themis/as.php?cc=uk&s=382106086&l=NE&b=0&t=1177278850';yv nR='uk';yfnEA(0);</script>
<!-- preceding code added by server. PLEASE REMOVE -->
and
Quote:
!-- text below generated by server. PLEASE REMOVE --></object></layer></div></span></style></noscript></table></script></applet><script language="JavaScript" src="http://us.i1.yimg.com/us.yimg.com/i/mc/mc.js"></script><script language="JavaScript" src="http://geocities.com/js_source/geov2.js"></script><script language="javascript">geovisit();</script><noscript><img src="http://visit.geocities.yahoo.com/visit.gif?uk1177278850" alt="setstats" border="0" width="1" height="1"></noscript>
<IMG SRC="http://geo.yahoo.com/serv?s=382106086&t=1177278850&f=uk-w58" ALT=1 WIDTH=1 HEIGHT=1>
You'll have to post a question in the javascript forum because I have no clue about that.

Try adding this to your css code as well:
Code: Select all
* {
margin: 0;
padding:0;
}
If deleting the flash div doesn't straighten out your extra space below the flash, try adding a height of 255px to the #middlecontainer div

Some of this is trial and error...

I got rid of that flash div hours ago and the middlecontainer was already coded as you suggested from earlier.

As for the Script, that seems to be something that is added to my HTML by my service provider when I upload. It's really annoying . It's only webspace provided by them, not a proper host. However, even when I run the HTML from my PC local site, without the script it still aligns left!

Also, neither deleting the flash div or making the middlecontainer: height 255px got rid of the extra space below the flash animation

Last edited by Craigj1303; Apr 22nd, 2007 at 22:50. Reason: added comments from LChad
Reply With Quote