丢失垂直居中表格的能力 [英] Lost ability to center tables vertically

查看:59
本文介绍了丢失垂直居中表格的能力的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一些CSS问题,并且有人向我指出了我应该拥有的<!DOCTYPE .....在我的代码顶部,

我现在做的。


它修复了所有继承问题,但它导致我的能力

中心表垂直消失。如果我删除该顶线,所有

都是好的。除了我以前的继承问题。


事情是我的代码用参数$ out_msg

调用一个函数,它始终是表格格式。然后它创建HTML输出

将我的$ out_msg作为嵌套表插入。


我尝试将下面的模板切换到基于DIV的结构,但是

太新了,结果我把$ out_msg集中在一个浏览器端口上

高于我的实际浏览器(我切掉了25%的顶部,甚至

虽然在HTML源代码中显示。)

哇,这里很累,有没有办法让桌子垂直居中

带桌子?


谢谢,如果我包含顶部

行,下面是停止cetnering的代码。


<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML

..01 // EN" http://www.w3.org/TR/html4/strict.dtd">

< html>

< head>

< title> zReturn< / title>

< LINK REL = stylesheet HREF =" zstyles.css" TYPE =" text / css">

< meta http-equiv =" imagetoolbar" content =" no">

< meta http-equiv =" imagetoolbar" content =" false">

< SCRIPT TYPE =" text / javascript" src = / js / javas.js>< / SCRIPT>

< / head>

< body>

< table HEIGHT-100%>

< tr>

< td VALIGN =" MIDDLE">

$ out_msg

< / td>

< / tr>

< / table>

< / body>

< / html>

I had some CSS problems, and they were solved by someone who pointed
out to me that I should have <!DOCTYPE ..... at the top of my code,
which I now do.

And it fixed all the inheritance problems, but it caused my ability to
center Tables vertically to disappear. If I remove that top line, all
is good. Except for my previous inheritance problems.

The thing is my code calls one funtion with the parameter $out_msg
which is always in Table format. It then creates the HTML output
inserting my $out_msg as a nested table.

I tried switching the template below to a DIV based structure, but am
too new to it, and turns out I was centering $out_msg on a browser port
that was above my actual browser (i cut off a good 25% of the top, even
though it showed in the HTML source).

Wow, so tired here, is there a way to proper vertically center a table
withing a table?

Thanks, and below is the code that stops cetnering if I include the top
line.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
..01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>zReturn</title>
<LINK REL=stylesheet HREF="zstyles.css" TYPE="text/css">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="imagetoolbar" content="false">
<SCRIPT TYPE="text/javascript" src=/js/javas.js></SCRIPT>
</head>
<body>
<table HEIGHT-"100%">
<tr>
<td VALIGN="MIDDLE">
$out_msg
</td>
</tr>
</table>
</body>
</html>

推荐答案

out_msg

它始终采用表格格式。然后它创建HTML输出

插入我的
out_msg
which is always in Table format. It then creates the HTML output
inserting my


out_msg作为嵌套表格。


我尝试切换模板下面是一个基于DIV的结构,但是对于它来说太新了,结果我在浏览器端口上居中
out_msg as a nested table.

I tried switching the template below to a DIV based structure, but am
too new to it, and turns out I was centering


out_msg

高于我的实际浏览器(虽然它在HTML源代码中显示,但我已经切断了25%的顶级,甚至是

)。


哇,这里很累,有没有办法让桌子垂直居中

带桌子?


谢谢,以下是阻止cetnering的代码如果我包括顶部的

行。


<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML

..01 // EN" http://www.w3.org/TR/html4/strict.dtd">

< html>

< head>

< title> zReturn< / title>

< LINK REL = stylesheet HREF =" zstyles.css" TYPE =" text / css">

< meta http-equiv =" imagetoolbar" content =" no">

< meta http-equiv =" imagetoolbar" content =" false">

< SCRIPT TYPE =" text / javascript" src = / js / javas.js>< / SCRIPT>

< / head>

< body>

< table HEIGHT-100%>

< tr>

< td VALIGN =" MIDDLE">
out_msg on a browser port
that was above my actual browser (i cut off a good 25% of the top, even
though it showed in the HTML source).

Wow, so tired here, is there a way to proper vertically center a table
withing a table?

Thanks, and below is the code that stops cetnering if I include the top
line.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
..01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>zReturn</title>
<LINK REL=stylesheet HREF="zstyles.css" TYPE="text/css">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="imagetoolbar" content="false">
<SCRIPT TYPE="text/javascript" src=/js/javas.js></SCRIPT>
</head>
<body>
<table HEIGHT-"100%">
<tr>
<td VALIGN="MIDDLE">


这篇关于丢失垂直居中表格的能力的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆