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 5 of 5
  1. #1
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts

    vertical & horizental center at a same time.

    I like to display the phrase " middle & center" in the vertically middle place and horizently center place at a same time.

    So I made the following code.

    Code:
    <center>
    <table width=100% height=100%>
    
      <tr>
        <td valign=middle align=center>
    
    middle & center
    
        </td>
      </tr>
    
    <table>
    </center>
    It works fine but the scroll bar is shown on the right.


    I like to display the phrase "middle & center" in the vertically middle place & horizently center place at a sam time without any scroll bars.

    Thanks in Advance
    Get my greedy up

  • #2
    New Coder
    Join Date
    May 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by joonstar
    I like to display the phrase " middle & center" in the vertically middle place and horizently center place at a same time.

    So I made the following code.

    Code:
    <center>
    <table width=100% height=100%>
    
      <tr>
        <td valign=middle align=center>
    
    middle & center
    
        </td>
      </tr>
    
    <table>
    </center>
    It works fine but the scroll bar is shown on the right.


    I like to display the phrase "middle & center" in the vertically middle place & horizently center place at a sam time without any scroll bars.

    Thanks in Advance
    Well I see a few issues. As far as I know there is no <center> tag. And you don't have a "/" to close off your table.

  • #3
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,801
    Thanks
    8
    Thanked 131 Times in 129 Posts
    Here

    Table-less.

    Works in IE6 and MOZ/FF

    to get rid of the side scroll bar I used:

    <style type="text/css">
    body {overflow: hidden;}
    </style>

  • #4
    Regular Coder
    Join Date
    May 2004
    Location
    Berkeley, California Age: 15
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ack!

    There is a <center> tag, but its old and deprecated and bad. You can achieve everything with this simple code:

    <div id="middle">
    Middle and center
    </div>

    and CSS:

    #middle {
    text-align: center;
    line-spacing: 400px;
    height: 400px;
    }

    You can adjust the 400px to whatever you want, if you want relative units (percents) that may be more complicated.
    Jalenack.com .:. YWDA Founder .:. Rounded Corners Maker 1.1! .:. My Blog
    The hardest thing about teaching is not knowing the right answers, but knowing the right questions - Elisabeth Klein
    Pretty buttons does not a great website make.

  • #5
    New Coder
    Join Date
    May 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Jalenack
    Ack!

    There is a <center> tag, but its old and deprecated and bad. You can achieve everything with this simple code:

    Well, thank you for posting that bit of wisdom, I had no idea.


  •  

    Posting Permissions

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