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
Html 调整包含图像的表的大小会调用巨大的白色区域_Html_Image_Html Table_Whitespace - Fatal编程技术网

Html 调整包含图像的表的大小会调用巨大的白色区域

Html 调整包含图像的表的大小会调用巨大的白色区域,html,image,html-table,whitespace,Html,Image,Html Table,Whitespace,我对桌子有个大问题。。我正在创建一个在表中有一些图像的页面。但是,如果我调整网页的大小,那么整个表格就会离开屏幕,从而出现一个大的白色区域 我尝试过所有愚蠢的事情。什么都不管用。溢出:隐藏不起作用。Scrollbar=“否”也可以。百分比不起作用。不管怎样,下面是表格和CSS的代码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-tr

我对桌子有个大问题。。我正在创建一个在表中有一些图像的页面。但是,如果我调整网页的大小,那么整个表格就会离开屏幕,从而出现一个大的白色区域

我尝试过所有愚蠢的事情。什么都不管用。溢出:隐藏不起作用。Scrollbar=“否”也可以。百分比不起作用。不管怎样,下面是表格和CSS的代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Notable Travels</title>
<style type="text/css">
.bg{
position: absolute;
top:0px;
left:0px;
width:100%;
height:100%;
z-index:0;
}

table {
  border-spacing: 10px;
  border-width: 5px;
  border-style: solid;
  border-color: #888;
}


#content {
  margin: 0 auto;
  z-index: 2;
  color: #000;
  text-align: center;
  font-family: 'Times New Roman';
  font-size: 24px;
  font-weight: bolder;
  text-decoration: blink;
}

td, th {
  border-spacing: 10px;
  border-width: thin;
  border-style: solid;
  border-color: #111;
  vertical-align: middle;
}

.tableimg {
  margin: 0 auto;
  width: 450px;
  height: 100px;
}


</style>
</head>

<body>

<table id="content">
  <tr>
    <th>Virtually travelling, some of the 1s ORed/ANDed with mines.</th>
  </tr>
  <tr>
    <td><a href="http://www.soporaeternus.de"><img src="_images/Sopor.jpg" class="tableimg" /></a></td>
  </tr>
  <tr>
    <td><a href="http://www.mensa-romania.ro"><img src"_images/Mensa.jpg" class="tableimg" /></a></td>
  </tr>
  <tr>
    <td><a href="http://www.chess.com"><img src="_images/Chess.jpg" class="tableimg" /></a></td>
  </tr>
</table>


<img src="_images/Links.jpg" border="0"  class="bg"/>
</body>
</html>

著名旅行
.bg{
位置:绝对位置;
顶部:0px;
左:0px;
宽度:100%;
身高:100%;
z指数:0;
}
桌子{
边界间距:10px;
边框宽度:5px;
边框样式:实心;
边框颜色:#888;
}
#内容{
保证金:0自动;
z指数:2;
颜色:#000;
文本对齐:居中;
字体系列:“新罗马时代”;
字体大小:24px;
字体大小:粗体;
文字装饰:闪烁;
}
td,th{
边界间距:10px;
边界宽度:薄;
边框样式:实心;
边框颜色:#111;
垂直对齐:中间对齐;
}
.表{
保证金:0自动;
宽度:450px;
高度:100px;
}
事实上,有些1与地雷有关。

我已经编辑过了。

请告诉我您没有试图使用表格来设置整个网页的样式。不管怎样,我想这就是你想要的:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Notable Travels</title>
  <style type="text/css">
    html {
      min-width: 100%;
      min-height: 100%;
      background-image: url(_images/Links.jpg);
      background-repeat: no-repeat;
    }

    table {
      border-spacing: 10px;
      border-width: 5px;
      border-style: solid;
      border-color: #888;
      background-color: #FFF;
    }

    #content {
      margin: 0 auto;
      color: #000;
      text-align: center;
      font-family: 'Times New Roman';
      font-size: 24px;
      font-weight: bolder;
      text-decoration: blink;
    }

    td, th {
      border-spacing: 10px;
      border-width: thin;
      border-style: solid;
      border-color: #111;
      vertical-align: middle;
    }

   .tableimg {
      margin: 0 auto;
      width: 450px;
      height: 100px;
    }
  </style>
</head>
<body>
  <table id="content">
    <tr>
      <th>Virtually travelling, some of the 1s ORed/ANDed with mines.</th>
    </tr>
    <tr>
      <td><a href="http://www.soporaeternus.de"><img src="_images/Sopor.jpg" class="tableimg" /></a></td>
    </tr>
    <tr>
      <td><a href="http://www.mensa-romania.ro"><img src="_images/Mensa.jpg" class="tableimg" /></a></td>
    </tr>
    <tr>
      <td><a href="http://www.chess.com"><img src="_images/Chess.jpg" class="tableimg" /></a></td>
    </tr>
  </table>
</body>
</html>

著名旅行
html{
最小宽度:100%;
最小高度:100%;
背景图片:url(_images/Links.jpg);
背景重复:无重复;
}
桌子{
边界间距:10px;
边框宽度:5px;
边框样式:实心;
边框颜色:#888;
背景色:#FFF;
}
#内容{
保证金:0自动;
颜色:#000;
文本对齐:居中;
字体系列:“新罗马时代”;
字体大小:24px;
字体大小:粗体;
文字装饰:闪烁;
}
td,th{
边界间距:10px;
边界宽度:薄;
边框样式:实心;
边框颜色:#111;
垂直对齐:中间对齐;
}
.表{
保证金:0自动;
宽度:450px;
高度:100px;
}
事实上,有些1与地雷有关。

此表是您的整个页面吗?呃,我想您需要重新编辑。在每行前面留出四个空格,将其标记为代码;)当然,我不是在设计整个页面的样式。这只是一个餐桌问题。谢谢你的反对票。它不起作用。事实上,整个表格现在都在背景图像后面。还有白色区域。你的源代码甚至没有背景图片。。。如果希望得到完整的解决方案,则需要发布完整的源代码。在工作正常的空白选项卡中;)我理解。对不起。这是完整的代码。然而,由于某些原因,即使在空白页中,第二个图像也根本不显示。