Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    New Coder
    Join Date
    Nov 2010
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IE page positioning problem

    I've had reports back from people viewing my site in Internet Explorer that the content is appearing half off the screen to the right. Does anyone know why it's doing this and can tell me the coding to fix it?

    www.villagetweet.co.uk

    I'm looking for a way to centre my website on the screen, so an easy fix would be great. I'm very new to web design and trying to teach myself how along the way and am finding all the coding rather confusing, so any easy worded help would be appreciated.

    Thanks

  • #2
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,996
    Thanks
    15
    Thanked 233 Times in 233 Posts
    First, remove the html tags from your stylesheet
    Code:
    <style type="stretchy">
    and I believe that your 'if IE 6' statement needs to go below all the other style statements.

  • #3
    New Coder
    Join Date
    Nov 2010
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks - I've moved the section of rules starting with the IE6 bit and they've all changed colour now to the proper css coding colours.


    I'm running a subdomain version that I'm editing here.

    http://www.villagetweet.co.uk/Tweet_Web/

    In the coding for the IE6 bit - is any of that causing the glitch in IE6?
    Is this line with the absolute positioning causing the problem?

    PHP Code:
     #background { position:absolute; z-index:-1; } 

    When you say remove the html tags from my style sheet - where from? Do I need to edit the actual CSS page? Really confused about all this coding!
    Last edited by pearson; 11-02-2010 at 05:07 PM.

  • #4
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,996
    Thanks
    15
    Thanked 233 Times in 233 Posts
    OK, the if IE statement needs to be after the style closing tag on your page, not inside it. And yes, remove the html style tags from the actual style sheet.

  • #5
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    He means remove the following from your stylesheet:

    Code:
    <style type="stretchy">
    </style>

  • #6
    New Coder
    Join Date
    Nov 2010
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok - I've noticed that the website is now sitting in the top left after modifying the CSS - the old version looked like it had a slight border around the edge. That's good isn't it?

    I also tried copying the IE6 rules to below the style tag - but the text in Dreamweaver has now turned to light grey - is that right or does that mean it's not applying the rules?

  • #7
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Light grey usually means you have a commented section. Move the IE6 statement below all the other style rules, but make sure you dont have */ after it.

  • #8
    New Coder
    Join Date
    Nov 2010
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    not sure what a commented section is - but its all modified on the sub domain now. I couldn't see any * in the code for the IE rules, the only / are in 1 rule referring to some CSS and the other is at the end - do I need that last style bit - or is the IE stuff not a style rule anyway?

    PHP Code:
    <!--[if IE 6]>
     <
    style type="text/css">
     
    html overflow-yhidden; }
     
    body overflow-yauto; }
     
    #background { position:absolute; z-index:-1; }
     #content { position:static; }
     
    </style>
     <![endif]--> 

    also, is anyone able to actually test this on a PC to see if it's still over to the right and 1/2 off the page? I can only test it on the mac version of IE, were it has always displayed fine.
    Last edited by pearson; 11-02-2010 at 06:01 PM.

  • #9
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Code:
    margin:{0px;}
    
    /*this is a comment section*/
    The characters /* open a comment and the */ close a comment. Anything between these opening and closing characters are removed from any coding flow.

    Also, yes your page is still way to the right in IE. You need to upload your css with whatever youhave changed. I still see the <style> tags in your css.
    Last edited by teedoff; 11-02-2010 at 06:08 PM.

  • #10
    New Coder
    Join Date
    Nov 2010
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I did modify the code/css pack too - but I'm making the changes to the sub domain site

    http://www.villagetweet.co.uk/Tweet_Web/

    that should have the modifications?

  • #11
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    You should fix the validation errors in your code as well. Validate here.

    You have 63 errors, most of which is the use of characters such as "&" which are non web conformant and should be replaced, but some other errors as well that might be causing some issues with IE.

  • #12
    New Coder
    Join Date
    Nov 2010
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    a lot of the "&" symbols are in the javascript for my image rollovers on the menu bars - are they ok or do they need to simply be deleted from the code? Will the image rollovers still work if I do that?

    PHP Code:
    <script type="text/javascript">
    function 
    MM_swapImgRestore() { //v3.0
      
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function 
    MM_preloadImages() { //v3.0
      
    var d=document; if(d.images){ if(!d.MM_pd.MM_p=new Array();
        var 
    i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0i<a.lengthi++)
        if (
    a[i].indexOf("#")!=0){ d.MM_p[j]=new Imaged.MM_p[j++].src=a[i];}}
    }

    function 
    MM_findObj(nd) { //v4.01
      
    var p,i,x;  if(!dd=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        
    d=parent.frames[n.substring(p+1)].documentn=n.substring(0,p);}
      if(!(
    x=d[n])&&d.allx=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(
    i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!
    && d.getElementByIdx=d.getElementById(n); return x;
    }

    function 
    MM_swapImage() { //v3.0
      
    var i,j=0,x,a=MM_swapImage.argumentsdocument.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((
    x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrcx.oSrc=x.srcx.src=a[i+2];}
    }
    </script> 

  • #13
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Dont worry about the javascript errors, focus on the other errors. Then if there is still an issue, at least you know its not from incorrect code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •