日期:2014-05-17  浏览次数:20511 次

问两个HTML的小问题:)
1.   有个表格共两列,宽100%,第一列宽度为25像素,剩下的给第二列。如何设置?尝试了将第一列设置为25Px,第二列不设置宽度,但没用,第一列会被拉宽的
   
        2.   第二个比较难说清,如下
        <table>
            <tr>
                <td> <img   ...>   <div   style= "position:absolute "> </div> </td>
                ...
          <tr>
      <table>
示意图:
    ______   _________
  |图像     ||               |
  |             ||     层       |
  --------|               |
                  |               |
                  |               |
                  |               |
                  |               |
                  |               |
                  ---------
      想让鼠标移动到img上时显示层,层而且要出现在img的旁边。所以div中不能设置left和top。本来效果是不错的。但现在想让层在图像的右边且往上方显示,不知道如何才能做到。效果如下:
                  _________
                  |               |
                  |       层     |
                  |               |
                  |               |
    _______|               |
  |图像     ||               |
  |             ||               |
  --------   --------

------解决方案--------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN "
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<meta http-equiv= "Author " content= "飘零雾雨|edzmaster@gmail.com " />
<title> test </title>
</head>
<body>
<table border= "1 " width= "100% ">
<tr>
<td width= "50 "> e </td>
<td> test </td>
</tr>
</table>
</body>
</html>
------解决方案--------------------
给第一行的第二个td加上宽度,不如:

<td width= "25 "> <img width=24 heigth=24 src= 'a.gif '&g