Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image CSS/HTML:无法修改img';内部显示器的高度:表_Image_Height_Center_Css Tables - Fatal编程技术网

Image CSS/HTML:无法修改img';内部显示器的高度:表

Image CSS/HTML:无法修改img';内部显示器的高度:表,image,height,center,css-tables,Image,Height,Center,Css Tables,我试图做一个居中的,100%高的布局,没有固定的宽度(argh)。下面的解决方案似乎一切正常,除了我需要缩放到高度的img:100%,它不在表格单元格内缩放(在div之外一切正常)。 编辑:我可以在css和标签中设置固定高度,比如100px左右。为什么这不适用于% <div id="center"> <div id="tcontainer"> <div id="tleft">a</div> <div id="tright">&l

我试图做一个居中的,100%高的布局,没有固定的宽度(argh)。下面的解决方案似乎一切正常,除了我需要缩放到高度的img:100%,它不在表格单元格内缩放(在div之外一切正常)。 编辑:我可以在css和标签中设置固定高度,比如100px左右。为什么这不适用于%

<div id="center">
<div id="tcontainer">
  <div id="tleft">a</div>
  <div id="tright"><img id="bgright" src="images/bgright1.jpg" height="100px" /></div>
</div>
</div>

好的,问题已经解决了。我刚刚忘记在连续的孩子中通过“身高:100%”。它与显示:表格或图像没有任何关系。

如果我理解您的问题,它在Chrome上也可以工作:
html,body {
 margin:0;
 padding:0;
 height:100%; /* needed for container min-height */

 font-family:arial,sans-serif;
 font-size:small;
 color:#666;
}
#bgrepeat { /* unnecessary ATM */
 width: 100%;
 height: 100%;
 position: absolute;
 z-index: 0;
}

#bgright { /* HERE THE PROBLEM */
 height: 100%;
}
img { border: 0; /*float: left;*/ }

#center { 
 text-align: center;
 height: 100%;
}
#tcontainer {
 text-align: left; /* POTRZEBNE ? */
 background: red;
 height: 100%;
 display: table;
 margin: 0 auto;
}
#tleft {
 display: table-cell;
} 
#tright {
background: pink;
 display: table-cell;
}