How To Absolute Vertical center align a table?

  • nightshader
  • Novice
  • Novice
  • nightshader
  • Posts: 16

Post 3+ Months Ago

Like title. I cant figure this out. I had it setup before but forgot how to do it.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

Quote:
How To Absolute Vertical center align a table? Like title


I'm sorry if I sound rude, but you are much more likely to get help if elaborate a little. You seem to have a whole bunch of different properties all mixed together in that sentence and I'm really not sure what you are asking.
  • nightshader
  • Novice
  • Novice
  • nightshader
  • Posts: 16

Post 3+ Months Ago

Sorry, I thought that would clearly explain what i ask, but seem like it complicate it more. All i want is how to valign a table in the middle. But I figure it out. Thanks.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

<table align="center">

or

<center><table>blah blah blah blah
</table></center>
  • nightshader
  • Novice
  • Novice
  • nightshader
  • Posts: 16

Post 3+ Months Ago

See, they didnt understand what i want. I want a vertical align table, not horizontal align table. But i figure it out. Thanks. Post closed.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

Then post your solution here for others to learn ;)

Your initial question was kind of vague (to put it mildly), but after reading it again several times...

Code: [ Select ]
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"><tr><td align="center" valign="middle">
<table border="1" width="300"><tr><td>Hey look at me! I'm in the middle!</td></tr></table>
</td></tr></table>
  1. <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"><tr><td align="center" valign="middle">
  2. <table border="1" width="300"><tr><td>Hey look at me! I'm in the middle!</td></tr></table>
  3. </td></tr></table>
  • nightshader
  • Novice
  • Novice
  • nightshader
  • Posts: 16

Post 3+ Months Ago

Axe wrote:
Then post your solution here for others to learn ;)

Your initial question was kind of vague (to put it mildly), but after reading it again several times...

Code: [ Select ]
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"><tr><td align="center" valign="middle">
<table border="1" width="300"><tr><td>Hey look at me! I'm in the middle!</td></tr></table>
</td></tr></table>
  1. <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"><tr><td align="center" valign="middle">
  2. <table border="1" width="300"><tr><td>Hey look at me! I'm in the middle!</td></tr></table>
  3. </td></tr></table>


You have the rite code there. But becarefull, if you have sth like this in the begining of the page
Code: [ Select ]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

it wont work. You have to remove the
Code: [ Select ]
"http://www.w3.org/TR/html4/loose.dtd"
for it to be middle valign. Hope this help anyone.
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

Um, am I right in thinking you have only tested this in internet Explorer. What you are seeing is internet explorer's quirks mode, I doubt very much if you will get the same result in every browser.
  • sir.wiggles
  • Born
  • Born
  • sir.wiggles
  • Posts: 3

Post 3+ Months Ago

ok, huge bump here :P

I am wondering how i would vertically center align this table.
The table is already horizontally aligned (center) but i am not sure how to vertically align it.

Code: [ Select ]
<div align="center">
 <table width="800" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCFF" style="border:solid 1px #333333;>
  <!--DWLayoutTable-->
  <tr>
   <td height="121" colspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
  </tr>
  <tr>
   <td width="224" height="479" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
   <td width="576">&nbsp;</td>
  </tr>
 </table>
</div>
  1. <div align="center">
  2.  <table width="800" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCFF" style="border:solid 1px #333333;>
  3.   <!--DWLayoutTable-->
  4.   <tr>
  5.    <td height="121" colspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
  6.   </tr>
  7.   <tr>
  8.    <td width="224" height="479" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
  9.    <td width="576">&nbsp;</td>
  10.   </tr>
  11.  </table>
  12. </div>
  • dyefade
  • Expert
  • Expert
  • User avatar
  • Posts: 712
  • Loc: UK

Post 3+ Months Ago

Hehe, look at all that code, before everyone got their heads around CSS.

Whatever happened to rtm?
  • sir.wiggles
  • Born
  • Born
  • sir.wiggles
  • Posts: 3

Post 3+ Months Ago

the file format i am using is .html
anyway i can sort it without css?

basically is there a space is the below for which i can put something like valign or something in.
Code: [ Select ]
<div align="center">

<table width="800" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCFF" style="border:solid 1px #333333;>
  1. <div align="center">
  2. <table width="800" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCFF" style="border:solid 1px #333333;>
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2194
  • Loc: Canada

Post 3+ Months Ago

Why do you want to sort it without CSS? You're already using it...
Code: [ Select ]
<div align="center">

is the same as
Code: [ Select ]
<center>


But your answer is
Code: [ Select ]
<table width="800" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCFF" valign="middle" style="border:solid 1px #333333;>


Alternatively, with CSS, you can do
Code: [ Select ]
<table width="800" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCFF" style="border:solid 1px #333333; margin: auto 0">
  • larsen1492
  • Born
  • Born
  • larsen1492
  • Posts: 1

Post 3+ Months Ago

The easiest way i think is css. Here is an example:
http://n1scripts.com/css_scripts/css_ve ... ipts&id=16

Post Information

  • Total Posts in this topic: 13 posts
  • Users browsing this forum: No registered users and 70 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.