gpt4 book ai didi

html - 网站适用于 firefox,但不适用于 chrome 或 safari。导航行在 chrome 和 safari 中没有正确排列

转载 作者:太空宇宙 更新时间:2023-11-03 21:58:10 25 4
gpt4 key购买 nike

下面是我的网站代码。它在 firefox 上完美运行,但在 chrome 或 safari 上运行不佳。唯一不起作用的是导航行显示在标题图片的右侧,主页按钮是标题图片的全长。我认为这与 display:inline 在 css 中有关,但我确定。

<html>
<head>
<title>Workouts</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div id = "page">
<table border="0" cellspacing="0" cellpadding="0" align="center" class="border" width = "50%" height ="100%">
<div id = "header">
<tr>
<td>
<img src =images/header_logo2.png />
</td>
</tr>
</div>
<tr class = "nav" height="30px" width="100%">
<td></td>
<td><a href="index.html">Home</a></td>
<td><a href="about.html">About</a></td>
<td><a href="workouts.html">Workouts</a></td>
<td><a href="trainers.html">Trainers</a></td>
<td><a href="contact.html">Contact</a></td>
<td></td>


</tr>
<tr class = "content" width="100%">
<td><img width="100%" src="images/content.png" /></td>
</tr>
</table>
</div>
</body>
</html>

这是我的样式表

* {
margin-top:0;
padding-top:0;
padding-bottom: 0;
margin-bottom: 0;
}
body{
background:pink;
}
.border{
background-color: #c92f51;
}
.nav a{
text-decoration: none;
color:pink;
}
.nav a:hover{
color:gray;
}
.nav td{
display: inline-table;
width: 14.29%;
height="30px";
text-align: center;
font-size: 24px;
color:pink;

}
tr .content{
background:#c92f51;
}
.content td{
background:white;
padding: 30px 30px 30px 30px;
}

最佳答案

没有 DOCTYPE 声明的无效标记。通过在 w3c validator 中复制/粘贴来检查您的代码检查错误。

关于html - 网站适用于 firefox,但不适用于 chrome 或 safari。导航行在 chrome 和 safari 中没有正确排列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12312524/

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