center vertical

W

Wijnand Nijs

I can "center" my table in a window horizontaly. Is there a way to do
that verticaly? Now I put some <BR> before the table, but the result
differs from the window size.

Thanks...
Wijnand
 
E

EightNineThree

darkside said:
Like this?
http://www.re-create-it.co.uk/

It can be done as below

<table width="100%" height="100%" align="center">
<tr align="center">
<td>
<p>Content here is centered on the screen</p>
</td>
</tr>
</table>

Please don't give anymore advice.
There is no height attribute for table.

Here we see a 100 pct (height and width) table -
http://karlcore.com/100pcttable/100pctnodtd.php
Notice how this "works". Unfortunately, it only works because there is no
DTD. As such, it throws the browser into "Quirks mode".
Last I checked, it worked in all browsers.

This may be a suitable "workaround" for some people, but it is not for me. I
care about the quality of my work and I will not walk around topless with no
DTD.
This is the same exact page with an HTML 4.01 Strict DTD -
http://karlcore.com/100pcttable/100pctwithdtd.php
Notice that despite the fact that the "height" attribute remains on the
table element, it does not show up? This is because the browser is no
longer in "Quirks mode" but is rather following the DTD we have given to it.
(It is also still not valid markup because of the height attribute)

Now, there may be a solution to this issue, borrowed from our pal, Brucie
and a post he made to CIWAH -
http://karlcore.com/100pcttable/100pctcsswithdtd.php
This is 100% valid HTML 4.01 Strict and does what is intended by the
previous poster's bad advice.
 
?

=?ISO-8859-1?Q?Fran=E7ois_de_Dardel?=

EightNineThree said:
Please don't give anymore advice.
There is no height attribute for table.

Here we see a 100 pct (height and width) table -
http://karlcore.com/100pcttable/100pctnodtd.php
Notice how this "works". Unfortunately, it only works because there is no
DTD. As such, it throws the browser into "Quirks mode".
Last I checked, it worked in all browsers.

This may be a suitable "workaround" for some people, but it is not for me. I
care about the quality of my work and I will not walk around topless with no
DTD.
This is the same exact page with an HTML 4.01 Strict DTD -
http://karlcore.com/100pcttable/100pctwithdtd.php
Notice that despite the fact that the "height" attribute remains on the
table element, it does not show up? This is because the browser is no
longer in "Quirks mode" but is rather following the DTD we have given to it.
(It is also still not valid markup because of the height attribute)

Now, there may be a solution to this issue, borrowed from our pal, Brucie
and a post he made to CIWAH -
http://karlcore.com/100pcttable/100pctcsswithdtd.php
This is 100% valid HTML 4.01 Strict and does what is intended by the
previous poster's bad advice.

Excellent, 893, this is quite illuminating!
The third example is usable, after all, at least in some browsers: works
OK in NN7 (Mac), acceptably in Safari (small margin problems) but not in
iCab or MSIE (5.2, Mac)...sigh!... whilst the first example (no DTD)
works in all... re-sigh!...

So, stick to the first conclusion:
 
W

Wijnand Nijs

Hello,

Thanks a lot for all the response, but...
I tried the solution from Brucie, but it dosn't work for tables < 100%.
I am not yet so familiar with real HTML, maybe thats the problem. The
problem page is:

http://www.alf4all.demon.nl

Any advice?

Thanks and greetings...
Wijnand
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top