Results 1 to 5 of 5

Thread: Web Page not Sitting in Center of Window!

  1. #1
    Join Date
    Aug 2006
    Posts
    114

    Web Page not Sitting in Center of Window!

    Hello Friends,
    I am having the strange problem while writing the commands in CSS. I don't know the reason but I am not able to fix my web page in center of window. Can anyone have faced such type of problem.?? Please tell me the solution for fixing the width of web page in center of window.!! Also I am facing the problem of Unstyled version of web page appearing in IE. Any suggestions related to the problem is welcomed.!
    Last edited by warehouse peon; 06-02-2010 at 02:07 AM.
    |===================|
    |YAY if that made sense...|
    |===================|

  2. #2
    Join Date
    Nov 2008
    Posts
    1,192

    Re: Web Page not Sitting in Center of Window!

    Are you using the latest version of Internet Explorer.?? Because such types of errors can cause in the older version because of lack of compatibility for the CSS. Also many times the issue that you mentioned, in your IE unstyled version is appearing of web page. This can happen because of the Flash Of Unstyled Content. I think that your website may be suffering from that. Its very bad to say that the correct way of centrally aligning content through CSS doesn't actually work in IE. So I think that there is not your fault and you should try changing the browser.

  3. #3
    Join Date
    Mar 2008
    Posts
    672

    Re: Web Page not Sitting in Center of Window!

    I am with the 'void'. Its true that even if you use the correct way of centrally aligning content in Internet Explorer, by using the CSS which is as follows :
    Code:
    #container {
    width: 850px;
    margin: 0 auto
    }
    It will not work accordingly. For fixing this you would have to make some changes in the command and you should use the following command :
    Code:
    body {
    text-align: center
    }
    #container {
    width: 850px;
    margin: 0 auto;
    text-align: left
    }
    By using this code, you can do the central alignment of the container in IE.

  4. #4
    Join Date
    Mar 2008
    Posts
    349

    Re: Web Page not Sitting in Center of Window!

    If you are facing an issue of getting unstyled version of web page appearing in Internet Explorer that means your website is suffering from the Flash Of Unstyled Content. For doing the CSS, you should be using the @import directive which would be looking like this :
    Code:
    <style type="text/css">@import "styles.css";</style>
    for calling your CSS file, then this is the where the problem is generating. Instead of using this you would have to insert either a link or a script element into the header. The following is the script :
    Code:
    # <script type="text/javascript" src="scripts.js"></script>
    And the following is the command for link :
    Code:
    # <link rel="stylesheet" href="styles.css" type="text/css" media="print" />
    Hope that doing this helps you..

  5. #5
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Web Page not Sitting in Center of Window!

    You will have to write the following code for aligning the Web Page in Center of Window :
    Code:
    body
    {
        text-align: center
    }
    
    #container
    {
        width: 650px;
        margin: 0 auto;
        text-align: left
    }
    To prevent the text from centrally aligning too, we insert text-align: left into the container div. Only by doing this you will get your alignment at center.

Similar Threads

  1. Window Media Center DVD Upscaling by PC
    By Texas in forum Portable Devices
    Replies: 7
    Last Post: 04-11-2011, 12:09 AM
  2. what is new in Window 7 media center
    By CACTUS101 in forum Windows Software
    Replies: 5
    Last Post: 19-12-2009, 06:45 AM
  3. Window 7 Media Center Edition
    By Zebaril in forum Windows Software
    Replies: 3
    Last Post: 17-08-2009, 12:40 PM
  4. IE7 blank page when one window close and tries to reopen
    By toeknee29uk in forum Technology & Internet
    Replies: 3
    Last Post: 22-01-2009, 10:58 AM
  5. Cant Open Window Media center
    By Ein17 in forum Windows Software
    Replies: 3
    Last Post: 20-11-2008, 11:56 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,567,924.18798 seconds with 16 queries