Anyone kno whow i would 'centre' my site?

Discussion in 'HTML & Website Design' started by crb187, Mar 22, 2008.

  1. #1
    I have been trying to centre this site but had no luck. There seems to be a lot of conflicting info on the web over how best to do it. I am new to html and a little confused. If anyone knows that'd be great. Here is the code for anyone to have a go on.

    Cheers for any help.

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>AllScoresNow - The Web's Greatest Live Sports Scores Site</title>
    <meta name="description" content="Live" sports=""
    scores="" updated="" by="" the="" minute=""
    soccer="" football="" baseball="" basketball=""
    handball="" plus="" free="" betting=""
    offers="" and="" odds="">
    <link>
    <meta>
    </head>
    <body style="width: 931px;">
    <table style="text-align: left; height: 121px; width: 929px;"
    border="0" cellpadding="0" cellspacing="0">
    <tbody>
    <tr>
    <td
    style="white-space: nowrap; vertical-align: bottom; width: 927px;">
    <a href="http://www.allscoresnow.com/"><span
    style="text-decoration: underline;"><img
    style="border: 0px solid ; width: 486px; height: 88px;" alt=""
    src="logo.jpg"></span></a>&nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp;<a href="www.allscoresnow.com"><img
    style="border: 0px solid ; width: 49px; height: 19px;" alt=""
    src="home.jpg" align="middle"></a>&nbsp;<a
    href="http://www.allscoresnow.com/aboutus"><span
    style="text-decoration: underline;"><img
    style="border: 0px solid ; width: 70px; height: 19px;" alt=""
    src="aboutusgrey.png" align="middle"></span></a>&nbsp;<a
    href="mailto:info@allscoresnow.com"><span
    style="text-decoration: underline;"><img
    style="border: 0px solid ; width: 61px; height: 19px;" alt=""
    src="contactgrey.png" align="middle"></span></a><br>
    <img style="width: 926px; height: 18px;" alt=""
    src="barsmall.jpg"></td>
    </tr>
    </tbody>
    </table>
    <table style="text-align: left; width: 929px; height: 1856px;"
    border="0" cellpadding="0" cellspacing="0">
    <tbody>
    <tr>
    <td
    style="white-space: nowrap; vertical-align: top; width: 806px; height: 1860px;">
    <table style="text-align: left; height: 264px; width: 800px;"
    border="0" cellpadding="0" cellspacing="0">
    <tbody>
    <tr>
    <td
    style="white-space: nowrap; width: 532px; height: 262px; vertical-align: top; text-align: left;"><img
    style="width: 493px; height: 18px;" alt=""
    src="bettingoffers.jpg" align="top"><br>
    <map name="offersbox">
    <area shape="rect" coords="2,164,493,232"
    href="http://ads.betfair.com/redirect.aspx?pid=5701&amp;bid=1847">
    <area shape="rect" coords="1,87,493,157"
    href="http://www.bet365.com/home/default.asp?affiliate=365_016876&amp;lng=1&amp;oty=1&amp;tzi=1">
    <area shape="rect" coords="0,10,493,80"
    href="http://boylesportsreklame.com/ovuda.asp?AffID=854&amp;BanID=202&amp;bu=31&amp;Affhrefadd=betting%2F%3Fgi%3D4%26fimsced%3D30%26fimsoec%3D1">
    <area shape="default" coords="0,0,493,232"
    nohref="">
    </map>
    <img src="offersbox.png" usemap="#offersbox"
    border="0" height="232" width="493">
    <img alt="" src="offersbox.psd"><br>
    </td>
    <td
    style="white-space: nowrap; vertical-align: top; text-align: right; height: 262px; width: 302px;"><a
    href="http://ads.betfair.com/redirect.aspx?pid=5701&amp;bid=1558"><img
    src="http://ads.betfair.com/renderImage.aspx?pid=5701&amp;bid=1558"
    border="0"></a></td>
    </tr>
    </tbody>
    </table>
    <img style="width: 799px; height: 18px;" alt=""
    src="scores.gif" align="top"><br>
    <iframe
    src="http://www.livescore.betradar.com/livescore/mybet/?language=en"
    name="myInlineFrame" align="left" frameborder="0"
    height="1520" scrolling="auto" width="800">Your
    Brower Does Not
    Support iFrame</iframe>
    </td>
    <td
    style="white-space: nowrap; vertical-align: top; width: 123px; height: 1880px;"><a
    href="http://boylesportsreklame.com/ovuda.asp?AffID=854&amp;BanID=402&amp;bu=31&amp;Affhrefadd=%2F%3Ffimsced%3D30%26fimsoec%3D1"><img
    src="http://boylesportsreklame.com/evena.asp?AffID=854&amp;BanID=402&amp;b=402%2Egif"
    border="0" height="600" width="120"></a><br>
    <img style="border: 0px solid ; width: 120px; height: 600px;"
    alt=""
    src="http://images.bet365affiliates.com/Channel.aspx?CID=83&amp;LnkID=365_016876&amp;oty=1&amp;lng=1"
    align="top"><br>
    <a
    href="http://ads.betfair.com/redirect.aspx?pid=5701&amp;bid=1880"><img
    src="http://ads.betfair.com/renderImage.aspx?pid=5701&amp;bid=1880"
    border="0"></a></td>
    </tr>
    </tbody>
    </table>
    <div style="text-align: center; margin-top: 0px; height: 16px;"><span
    style="font-family: Helvetica,Arial,sans-serif;"></span>
    <hr style="width: 100%; height: 2px;"><span
    style="font-family: Helvetica,Arial,sans-serif;"><br>
    Copywrite ©
    2008 AllScoresNow<br>
    <br>
    <br>
    </span></div>
    </body>
    </html>
     
    crb187, Mar 22, 2008 IP
  2. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #2
    Put it all in a wrapper div, and in the css place a width to the div and margin:auto; it.

    So like this (although your code is really bad, i'd recomend recoding the whole thing so it actually validates, if you want I could do it for a small fee):

     
    twistedspikes, Mar 22, 2008 IP
  3. Sonikk

    Sonikk Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Right there..
     
    Sonikk, Mar 22, 2008 IP
  4. crb187

    crb187 Active Member

    Messages:
    113
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #4
    ok thanks for this. The code may well be pretty bad. I am very new to this. I tw as just done with Kompozer, so i didn't actually cod it myself, it was all generated. How does bad code affect a site though? I mean presumably it functions the same?
     
    crb187, Mar 22, 2008 IP
  5. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #5
    Bad code can make it work differently in different browsers, it doesn't keep your code safe for new/old versions of browsers, it makes the page less accessible (by screen readers used by visually impaired people for example), there are arguements that it affects your search engine position due to spiders having trouble scanning the site, i'm sure there are more reasons.
     
    twistedspikes, Mar 22, 2008 IP
  6. thataaronkid

    thataaronkid Peon

    Messages:
    124
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Quote:
    Originally Posted by twistedspikes
    Put it all in a wrapper div, and in the css place a width to the div and margin:auto; it.
    Right there..


    that would be the easiest way.
     
    thataaronkid, Mar 22, 2008 IP