【发布时间】:2021-10-16 03:11:48
【问题描述】:
我是 Web 开发的新手,我正在尝试找出我在标题方面遇到的问题。我希望我的标题是响应式的,并且不会导致它旁边的按钮元素重叠。
我尝试将position、float 和transform 元素分别单独应用到标题部分,但这似乎不能解决问题,或者我只是不知道如何正确使用它们.
下面是我的 html 和 css 的示例。
HTML:
<header>
<a href="Website.html"><img id="smallLogo" src="/Users/ultimateorganism/Desktop/Brown-Dev-Proj-Vol.1/FuturUImages/smallLogo.png" alt="smallLogo"></a>
<h1 class="bizPage">FuturU</h1>
<div class="homeButtons">
<a href="Website.html" class="btn btn-outline-light" id="linkHomePage">Home</a>
<a href="Mindmovies.html" class="btn btn-outline-light" id="linkMindMovies">MindMovies</a>
<a href="mailto:pbusko5@gmail.com?subject=I am interested in an affirmation/mindmap!" class="btn btn-outline-light" id="linkContact">Contact</a>
<a href="About.html" class="btn btn-outline-light" id="linkAbout">About</a>
<a href="Testimonials.html" class="btn btn-outline-light" id="linkTestimonials">Testimonials</a>
<hr style="background-color: white; height: 3px; opacity: initial;">
</div>
<hr style="background-color: white; height: 3px; opacity: initial;">
</header>
CSS 类:
#smallLogo{
width: 110px;
height: 110px;
float: left;
}
.bizPage{
font-size: 80px;
color: white;
position: relative;
top: 30%;
left: 30%;
}
header{
background-color: black;
font-family: Courier;
justify-content: center;
}
.homeButtons{
position: absolute;
top: 32px;
right: 26px;
font-size: 8px;
}
.lineHeader, .lineFooter{
margin-left: auto;
margin-right: auto;
color: white;
height: 3px;
width: auto;
{
对此的任何解决方案将不胜感激。谢谢
【问题讨论】:
标签: html css header format html-heading