[英]<div align="top" align="left"> not working
When I use it instead puts the div the the top and center当我使用它时,将 div 放在顶部和中心
HTML HTML
<div align="center"> <div style="max-width:800px"> <div> <div> <div style="CLEAR: none; BORDER-RIGHT: black 1px solid; BORDER-LEFT: black 1px solid" class="Header" align="center"> <div class="Banner"> <div style="max-width:100%"> <div> <div> <div align="top" align="left"> <a class="BannerText" href="https://web.archive.org/web/20060528010436/http://www.roblox.com:80/Default.aspx">ROBLOX.com</a></div> <div align="center" style="max-width:300px"> <a href="https://web.archive.org/web/20060528010436/http://www.roblox.com/Default.aspx" blankurl="/Thumbs/Blank.ashx?x=311&y=45" imageurl="/images/logo_pure_alpha.png" style="display:inline-block;BEHAVIOR:url(/web/20060528010436im_/http://www.roblox.com/UI/Image.htc);cursor:hand;"></a> </div> <div align="right"><span class="BannerText"> <a class="BannerText" href="https://web.archive.org/web/20060528010436/http://www.roblox.com:80/Login/New.aspx">Sign Up</a></span></div> </div> </div> </div> </div> </div> </div>
CSS CSS
.Header
{
font-size: 14px;
}
.Banner
{
PADDING: 8px;
}
.BannerText
{
font-weight: bold;
color: white;
}
a.BannerText:link, a.BannerText:visited, a.BannerText:active
{
text-decoration: none;
COLOR: white;
}
a.BannerText:hover
{
text-decoration: underline;
COLOR: white;
}
I tried editing it and googling it but I found nothing.我尝试对其进行编辑和谷歌搜索,但一无所获。 This is old HTML code I found on the wayback machine https://web.archive.org/web/20060528010436/http://www.roblox.com:80/ I find the old header interesting and would like to use it for my projects.
这是我在 wayback 机器https://web.archive.org/web/20060528010436/http://www.roblox.com:80/上找到的旧 HTML 代码我发现旧的 header 很有趣,想用它我的项目。 Even If I update it to HTML5 code, I don't know if using a table instead of a header tag will hurt site optimization/seo
即使我将其更新为 HTML5 代码,我也不知道使用表格而不是 header 标签是否会损害站点优化/seo
The align property is deprecated . align 属性已弃用。 Use the CSS
top
and left
properties, along with a position: fixed
attribute.使用 CSS
top
和left
属性,以及position: fixed
属性。 Read more on CSS positioning here .在此处阅读有关 CSS 定位的更多信息。
<div align="center"> <div style="max-width:800px"> <div> <div> <div style="CLEAR: none; BORDER-RIGHT: black 1px solid; BORDER-LEFT: black 1px solid" class="Header" align="center"> <div class="Banner"> <div style="max-width:100%"> <div> <div> <div style="position:fixed;top:0;left:0;"> <a class="BannerText" href="https://web.archive.org/web/20060528010436/http://www.roblox.com:80/Default.aspx">ROBLOX.com</a></div> <div align="center" style="max-width:300px"> <a href="https://web.archive.org/web/20060528010436/http://www.roblox.com/Default.aspx" blankurl="/Thumbs/Blank.ashx?x=311&y=45" imageurl="/images/logo_pure_alpha.png" style="display:inline-block;BEHAVIOR:url(/web/20060528010436im_/http://www.roblox.com/UI/Image.htc);cursor:hand;"></a> </div> <div align="right"><span class="BannerText"> <a class="BannerText" href="https://web.archive.org/web/20060528010436/http://www.roblox.com:80/Login/New.aspx">Sign Up</a></span></div> </div> </div> </div> </div> </div> </div>
It hurt me physically to use the inline CSS style attribute.使用内联 CSS 样式属性让我身体受到伤害。 I would've used a class, but something tells me you're looking for a quick fix.
我会使用 class,但有些东西告诉我你正在寻找快速修复。 Please take some basic html and css tutorials.
请学习一些基本的 html和css教程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.