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 11 of 11
  1. #1
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post

    Page alignment issue

    Hello

    I have two index.html files (in two different folders) on a server.

    The first file has the Web page centered - which is how I want it:

    http://stevehigham59.7host.com/final...inal/index.htm

    The second file, which should appear exactly the same, is incorrectly left aligned and I cannot work out why:

    http://stevehigham59.7host.com/final...enu//index.htm

    Both files have exactly the same in their <HEAD> tages:

    Code:
    <link rel="stylesheet" href="../_common/css/main.css" type="text/css" media="all">
    <link href="imageMenu.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="css/contact.css" media="screen" />
    Both index files can 'see' their respective CSS files. Altogether both index files reference five different CSS files.

    Any advice on resolving this would be appreciated.

    Thanks.

    Steve

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,957
    Thanks
    9
    Thanked 727 Times in 721 Posts
    http://stevehigham59.7host.com/final...enu//index.htm

    The link to main.css is broken on the second url. That double slash before index.htm looks odd as well.

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    http://stevehigham59.7host.com/final...n/css/main.css has html code in it instead of the CSS used by the page that works.


    Validator results



    .
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #4
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post
    Hello SB65

    But the links to both files are exactly the same:

    <link rel="stylesheet" href="../_common/css/main.css" - oldIndex

    <link rel="stylesheet" href="../_common/css/main.css" - newIndex

    Steve

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    The one that's broke appears to be in ...finalProof/imagemenu// (what's up with the // ?)
    and the one that works is in ...finalProof/imagemenu original/

    Here's what's in it-
    main.css:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <HTML><HEAD><TITLE>The page cannot be found</TITLE>
    <META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
    <STYLE type="text/css">
      BODY { font: 8pt/12pt verdana }
      H1 { font: 13pt/15pt verdana }
      H2 { font: 8pt/12pt verdana }
      A:link { color: red }
      A:visited { color: maroon }
    </STYLE>
    </HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD>
    
    <h1>The page cannot be found</h1>
    The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
    <hr>
    <p>Please try the following:</p>
    <ul>
    <li>Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.</li>
    
    <li>If you reached this page by clicking a link, contact
     the Web site administrator to alert them that the link is incorrectly formatted.
    </li>
    <li>Click the <a href="javascript:history.back(1)">Back</a> button to try another link.</li>
    </ul>
    <h2>HTTP Error 404 - File or directory not found.<br>Internet Information Services (IIS)</h2>
    <hr>
    <p>Technical Information (for support personnel)</p>
    <ul>
    <li>Go to <a href="http://go.microsoft.com/fwlink/?linkid=8180">Microsoft Product Support Services</a> and perform a title search for the words <b>HTTP</b> and <b>404</b>.</li>
    
    <li>Open <b>IIS Help</b>, which is accessible in IIS Manager (inetmgr),
     and search for topics titled <b>Web Site Setup</b>, <b>Common Administrative Tasks</b>, and <b>About Custom Error Messages</b>.</li>
    </ul>
    
    </TD></TR></TABLE></BODY></HTML>
    Last edited by Excavator; 11-13-2009 at 06:22 PM.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #6
    Senior Coder djm0219's Avatar
    Join Date
    Aug 2003
    Location
    Wake Forest, North Carolina
    Posts
    1,313
    Thanks
    4
    Thanked 207 Times in 204 Posts
    It is the double slash (/) in your second URL that is the problem/issue. If you remove one of them the page renders as you expect it to.
    Dave .... HostMonster for all of your hosting needs

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hehe, just realized it's a page about proof reading.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #8
    Regular Coder
    Join Date
    Apr 2008
    Posts
    685
    Thanks
    15
    Thanked 105 Times in 104 Posts
    lol nice spot how ironic.

    The link to main.css is broken because of the double slash, because it doesn't backup out of the folder properly.

    The link to main.css is fine within itself, it's because the // in the URL causes the browser to get confused, so when you are using ../ to back up out of the directory, it's removing one of the slashes!

  • #9
    New Coder
    Join Date
    Nov 2009
    Posts
    18
    Thanks
    4
    Thanked 0 Times in 0 Posts
    SteveH: This is off topic, but how are you getting your headings to look nice and smooth (the "features" and "browser compatibility" headings)?

    I've tried all fonts and as soon as I get larger than about 14px, it's all jagged. I want smooth headings like you have. Any tips would be appreciated. Thanks.

  • #10
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Quote Originally Posted by puffnstuff View Post
    SteveH: This is off topic, but how are you getting your headings to look nice and smooth (the "features" and "browser compatibility" headings)?
    It's not text.
    See http://stevehigham59.7host.com/final...g-features.gif
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #11
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post
    Hello

    Many thanks to everyone who has posted.

    I think those who have kindly contributed here have determined that the problem lies in the two forward strokes. As Scriptet says:
    because the // in the URL causes the browser to get confused
    .

    I have simply removed one of the forward strokes in the address bar and, yes, the page does now centre, but how would I permanently remove it?

    Thanks again.

    Steve


  •  

    Posting Permissions

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