Problems with XHTML

Discussion in 'Web Design & Coding' started by ~bk, Jan 20, 2004.

  1. ~bk

    ~bk I Political User

    Messages:
    3,768
    Location:
    Canada
  2. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    The <center> tag needs to be closed after the open <a href></a> tag, not before it. P.S. I'm not 100% sure if <center> is valid XHTML?

    also you need to close your <td> and <tr> tags,

    Proper format:

    Code:
    <table>
      <tr>
        <td>
        </td>
      </tr>
    </table>
     
  3. ~bk

    ~bk I Political User

    Messages:
    3,768
    Location:
    Canada
    I have closed the <td> <tr> tags in order. I even corrected the <center> but it still show 4 errors.
     
  4. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    <center> is not valid XHTML.
     
    ~bk likes this.
  5. ~bk

    ~bk I Political User

    Messages:
    3,768
    Location:
    Canada
    Is there any other way to center objects in XHTML?
     
  6. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    <td class="nav" valign="top"> is not closed before <td valign="top">
     
  7. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    <div style="text-align:center;"> shizz </div>

    Or if you're trying to center the main content ..

    <body>
    <div style="
    width:500px;background-color:white;height:200px;text-align:left;margin-left:auto; margin-right:auto;border:1px black solid;padding:10px;">
    site
    </div>
    </body>

    and in your css you need

    body {
    font-family: verdana, arial, sans-serif;
    font-size : 12px;
    color: #000000;
    background-color:#D5E7B2;
    text-align:center;
    }


    Important bits in bold, other bits are just demonstration :D
     
  8. ~bk

    ~bk I Political User

    Messages:
    3,768
    Location:
    Canada
    Still 1 error left. Sorry, im a beginner :D
     
  9. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    remove the <p></p> around the div, it cannot be nested in there.
     
  10. ~bk

    ~bk I Political User

    Messages:
    3,768
    Location:
    Canada
    Wohoo! Thanks for your yelp SPeedY_B and j79zlr. Really Appreciated it.


    P.S. What do you guys think of the layout?
     
  11. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    Your link on the splash page is wrong: http://daark870621345/deviantart.com I believe the forward-slash should be a dot/period :)

    Other than that, it's nice and clean, although I think the menu links on the left could do with shuffling right slightly, stop them being close to the edge, so to speak.
    padding-left:5px; should work
     
  12. ~bk

    ~bk I Political User

    Messages:
    3,768
    Location:
    Canada
    Thanks SPeedY_B. I'll make the corrections. Your site is pretty good. Can I link you on my site?
     
  13. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    Feel free, there's no law against it :p
     
  14. ~bk

    ~bk I Political User

    Messages:
    3,768
    Location:
    Canada
    Thanks :D.

    P.S. Thanks for adding me.
     
  15. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    No problem ;)