SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Validation Problem with Vertical centering

    Hi

    I've used this code on a few of my sites:

    Code:
    <table width="100%" height="100%">
    <tr>
    <td align="center" valign="middle">
    I use it to center my site horizontally and vertically (http://portfolio.help4newbies.com) for example. I am trying to make my site have W3C valid HTML. But I always get this:

    Error: there is no attribute "HEIGHT" for this element (in this HTML version)

    Is there any way to center a page horizon. and vert. w/out using the height attribute?

    I also got this Warning:

    No Character Encoding detected!

    I tried reading this, but it wasn't helping. I'm not sure which to use or which to add to my site. Could someone help me out here?

    Thanks! I appreciate any help!
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  2. #2
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hm...I think I'll use this:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    Does that look right?
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  3. #3
    SitePoint Wizard iTec's Avatar
    Join Date
    May 2001
    Location
    Sydney, Australia
    Posts
    2,243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    why not use <table style="width: 100%; height: 100%;">

    and the second post is correct.

  4. #4
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great - worked like a charm, iTec.
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com


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
  •