gpt4 book ai didi

javascript - HTML 日历 : Bottom image being displayed on the right not at the bottom

转载 作者:行者123 更新时间:2023-11-28 14:44:26 25 4
gpt4 key购买 nike

我有一个应该显示日历的 HTML 页面。 有一张图像要显示在日历上方和下方。但是 below(id=bottomCell) 显示不正确(在右边,不在下面)。

你能告诉我如何让底部图片处于正确的位置吗?

请在此处找到我的 html 和 png http://www.mediafire.com/?bcddcen1tdc2urr这样您就可以查看图像出了什么问题及其显示方式

<!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"><!-- InstanceBegin template="/Templates/homepage.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" src="dropDownMenu.js"></script>

<style type="text/css" media="all">
<!--

html, body, div, form, fieldset, legend, label, img { margin: 0; padding: 0; } table { border-collapse: collapse; border-spacing: 0; } th, td { text-align: center; } h1, h2, h3, h4, h5, h6, th, td, caption { font-weight:normal; } img { border: 0; }

a:link, a:hover, a:visited, a:active { width: 100%; height: 100%; }

#container {position: relative; background-color: #BCC5C5; }
#calendar { float: left; background-color: #BCC5C5; width: 435px; }
#calendar th { position: relative; }
#topCell {}
#bottomCell { }
#leftButton { float: left; position: relative;
#rightButton { float: left; position: relative; }

-->
</style>
</head>

<body>

<div>
<img id="topCell" src="../Images/topTableCell.png" alt="" width="500px" height="50px"/>
<div id="container">
<a id="leftButton" ><img src="../Images/leftButton.png" height="30px" width="30px" alt=""/></a>
<table id="calendar">
<th colspan=7> abcd </th>
<tr> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> </tr>
<tr> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> </tr>
<tr> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> </tr>
<tr> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> </tr>
<tr> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> </tr>
<tr> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> <td>abcd</td> </tr>
</table>
<a id="rightButton" ><img src="../Images/rightButton.png" height="30px" width="30px" alt=""/></a>
</div>
<img id="bottomCell" src="../Images/bottomTableCell.png" alt="" width="500px" height="30px"/>
</div>

</body>
<!-- InstanceEnd -->
</html>

最佳答案

@马克

在您的 container div 中有三个 float 元素,您没有清除它。所以,首先清除它

#container {position: relative;  background-color: #BCC5C5;  overflow:hidden; width:500px;}

关于javascript - HTML 日历 : Bottom image being displayed on the right not at the bottom,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5481878/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com