Blockquote嗨,我正在处理网站项目,我试图将应该设置在网页页脚中的地址ar添加到右侧的导航栏中。我无法垂直和水平对齐。这样做的任何指导将不胜感激。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="styles2.css">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
</head>
<body>
<div class="container-fluid">
<div class="page-header">
<nav class="navbar navbar-expand-lg navbar-light" >
<a class="navbar-brand" href="new.html"><h6>Your digital presence gateway</h6>
<img src="" class="d-inline-block align-top" alt="" loading="lazy">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
<div class="collapse navbar-collapse" id="navbarTogglerDemo02">
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown link
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
</ul>
</div>
</div>
<div class="icon-bar2">
<a class="active" href="address.html"><i class="fa fa-home"></i></a>
<a href="www.google.com"><i class="fa fa-search"></i></a>
<a href="mailto:adnanchatha@hotmail.com"><i class="fa fa-envelope"></i></a>
<a href="www.1techconsultant.com"><i class="fa fa-globe"></i></a>
<a href="tel:+ 93 312 734 9963"><i class="fa fa-whatsapp"></i></a>
</div>
</nav>
</body>
</html>
body {
font-size: 16px;
/*color: white;*/
background-color: #e3c7a2;
}
#logo-image {
background: url(logo.png) no-repeat;
width: 300px;
height: 150px;
}
.navbar-brand>h6 {
position: absolute;
top: 95pt;
left: 40pt;
color: blue;
}
.navbar{
background-color:#E3D3A2;
margin-top: -10pt;
width: 100%;
}
.navbar-nav>li {
top: 10pt;
margin: 0px 15px 0px 15px;
font-size: large;
font-weight: bold;
position: relative;
vertical-align: center;
}
.navbar-nav>li>a:hover {
background-color: #d69648;
border: blue 3px solid;
}
.navbar-nav>li>a:active {
text-decoration: underline;
align-content: left;
}
.dropdown-menu {
background-color: #ada6a6;
border: #010114 3px solid;
}
.nav .open > a, .nav .open > a:focus, .nav .open > a:hover {
background-color: #d69648;
}
.nav > li > a:focus, .nav > li > a:hover {
background-color: #d69648;
}
.icon-bar {
position: fixed;
top: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
right: 15pt;
}
.icon-bar a {
display: block;
text-align: center;
padding: 16px;
transition: all 0.3s ease;
color: white;
font-size: 20px;
}
.icon-bar a:hover {
background-color: #000;
}
.facebook {
background: #3B5998;
color: white;
}
.twitter {
background: #55ACEE;
color: white;
}
.google {
background: #dd4b39;
color: white;
}
.linkedin {
background: #007bb5;
color: white;
}
.youtube {
background: #bb0000;
color: white;
}
.content {
margin-left: 75px;
font-size: 30px;
}
.contact {
text-align: center;
background-color:#E3D3A2 ;
color:#030397;
}
/* Icon Bar 2 */
.icon-bar2 {
width: 50%;
background-color: #E3D3A2;
overflow: hidden;
float: right;
}
.icon-bar2 a {
float: right;
width: 20%;
text-align: center;
padding: 5px 0;
transition: all 0.3s ease;
color: #030397;
font-size: 25px;
padding: 10px 12px;
z-index: -1;
}
.icon-bar2 a:hover {
background-color:#E3D3A2;
}
@media all and (min-width: 960px) {
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="styles2.css">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
</head>
<body>
<div class="container-fluid">
<div class="page-header">
<nav class="navbar navbar-expand-lg navbar-light" >
<a class="navbar-brand" href="new.html"><h6>Your digital presence gateway</h6>
<img src="" class="d-inline-block align-top" alt="" loading="lazy">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
<div class="collapse navbar-collapse" id="navbarTogglerDemo02">
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown link
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
</ul>
</div>
</div>
<div class="icon-bar2">
<a class="active" href="address.html"><i class="fa fa-home"></i></a>
<a href="www.google.com"><i class="fa fa-search"></i></a>
<a href="mailto:adnanchatha@hotmail.com"><i class="fa fa-envelope"></i></a>
<a href="www.1techconsultant.com"><i class="fa fa-globe"></i></a>
<a href="tel:+ 93 312 734 9963"><i class="fa fa-whatsapp"></i></a>
</div>
</nav>
</body>
</html>
`与导航栏对齐] 1