【发布时间】:2012-12-07 06:45:35
【问题描述】:
你好吗?
我在编写我的第一个 HTML 网站时遇到了一些困难!我被困在一些细节上,如果你们能帮我一点,我真的很感激,这是我第一次写 HTML,所以我很抱歉我的错误和问题有点微不足道。
这是我的问题:
我试图在页面顶部制作绿色背景,但我不知道如何,我厌倦了使用 bgcolor 为表格所在的行着色,但这似乎不起作用。
这是我厌倦的工作:
<tr bgcolor = "green">
<table width = "50%">
<tr>
<td><a href = "http://www.google.com"> Home </a></td>
<td><a href = "http://www.google.com> About Us </a></td>
<td><a href = "http://www.google.com> Products </a></td>
<td><a href = "http://www.google.com> Services </a></td>
<td><a href = "http://www.google.com> Contact Us </a></td>
</tr>
</table>
</tr>
尝试在输入字段(用户名密码输入字段)旁边写一些东西时的另一个问题;当试图写“Office all 是一个互联网商店...”时,而不是出现在输入字段旁边,它们出现在它们下面!
这就是我所做的
<tr>
<td>
<form action = "processor.class" method = "get">
User Name:
<p/>
<input type = "text" name = "txtName" size = "10" />
<p/>
Password:
<p/>
<input type = "password" name = "txtPassword" size = "10" />
<p/>
<input type = "submit" value = "Login"/> <a href = "http://www.jce.ac.il"> Register account</a>
</form>
</td>
<td>
office all is an internet...
</td>
</tr>
你能帮帮我吗?
谢谢 =)
编辑:谢谢你们的帮助,正如你们所建议的那样,我将尝试阅读 CSS 教程并停止使用表格,我现在将关闭此线程并在我有更多问题时打开它(在我了解了更多关于 CSS 的知识之后)
【问题讨论】:
-
想知道为什么表格而不是普通的 html/css ...
-
使用 css 应用
background-color: green;,而不是bgcolor属性。 -
...老实说没想到,因为我说这是我第一次用 HTML/CSS 编写
-
“我现在关闭这个帖子,如果我有更多问题,我会打开它”——StackOverflow 不是留言板。如果您有新问题,请创建另一个问题。
-
哦,抱歉,这里还是新的 =)