SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  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)

    centering: not width, but height. how?

    I have a page www.geocities.com/staffcoservices/index2.html


    I want it to be centered "height" ways. So the boder is even across the top and bottom.

    I could do it by saying "top border = XX pixels", but I want it centered in both 800x600 and 1024x768

    any way?
    Last edited by Adam P.; Jul 9, 2001 at 09:18.
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  2. #2
    mouse monkey
    Join Date
    Dec 1999
    Location
    UK
    Posts
    656
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    You need to embed the whole page in a table with the width and height set to 100% and then set the valign of the table to middle. My portfolio site is an example of how it can be done if you need one.

    Hope that helps.

  3. #3
    Captain Internet neil's Avatar
    Join Date
    Jun 2001
    Location
    n.ireland
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There was no /index3.html in your site, swimm5001
    To center height wise you should use valign="center" inside the <td> tag, for instance..
    Code:
    <table width=100% height=100%>
      <tr>
        <td valign="center"><center>blah blah</center></td>
      </tr>
    </table>
    neil - Geocities, the trailer park of the web
    .<.<.<.<.<.<.<.<
    WEB[retype.net] + [guff.org]
    ICQ[273981] AIM[neiim]

  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)
    Originally posted by neil
    There was no /index3.html in your site, swimm5001
    [/code]
    sorry, it was index2.html

    i changed it up above
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    San Jose, California
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Neil,

    Shouldn't that be valign="middle" , not valign="center"

    the judge

  6. #6
    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)
    Originally posted by the judge
    Neil,

    Shouldn't that be valign="middle" , not valign="center"

    the judge
    Is it Neil? Or anyone? I'll need to know to use it.

    THanks
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  7. #7
    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)
    Originally posted by neil
    There was no /index3.html in your site, swimm5001
    To center height wise you should use valign="center" inside the <td> tag, for instance..
    Code:
    <table width=100% height=100%>
      <tr>
        <td valign="center"><center>blah blah</center></td>
      </tr>
    </table>
    Wouldn't that just center the cell? <td> is the cell tag, right? how would that chane the table centering?
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  8. #8
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You would nest an entire TABLE inside the TD tag. The valign="middle" simply acts on the contents of that TD.

    It would look like this:

    <table>
    <tr>
    <td align="center" valign="middle">

    <table><tr><td>
    This is the main table.
    </td></tr></table>

    </td>
    </tr>
    </table>
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  9. #9
    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)
    now i get,

    thanks for clearing that up creole
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  10. #10
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Go Creole! The SitePoint Mentor gives the definitive ruling! Hehe.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.


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
  •