简体   繁体   English

如何降低标题徽标? HTML / CSS

[英]How can I lower my header logo? HTML/CSS

I am trying to lower my header logo to position it closer to the menu bar. 我试图降低标题徽标以使其更靠近菜单栏。 What is the best method to do this? 最好的方法是什么? I tried to set the logo to bottom: 3px; 我尝试将徽标设置为底部:3px; in css, but no luck. 在CSS,但没有运气。

Could somebody please help me out? 有人可以帮我吗? Thank you in advance! 先感谢您!

https://jsfiddle.net/yb39pn0n/ https://jsfiddle.net/yb39pn0n/

http://imgur.com/a/3WeUY http://imgur.com/a/3WeUY

HTML 的HTML

<!DOCTYPE html>  
<html>
<head>
  <title>Home</title>
</head>
<body>
<link rel="stylesheet" href="index.css" type="text/css"/>
<meta charset="UTF-8">

<div class="container"> 
<div class="logo">
  <h1 align="center">
  <img src="logo2.png" height="110" width="500"  alt="A.Willi A.G" /> 
  </h1>
</div>

<div class="menu"> 
<ul>
  <li><a href="">Home</a></li> 
  <li><a href="">Kontakt</a></li>
  <li class="dropdown">
  <a href="#" class="dropbtn">Bewerber</a>
  <div class="dropdown-content">
  <a href="">Info</a>
  <a href="">Jobs</a>
</div>  
</li>   
   <li class="dropdown">   
   <a href="#" class="dropbtn">Kunde</a>
   <div class="dropdown-content">
   <a href=".html">Personalverleih</a>
   <a href=".html">Werkzeuge Mieten</a>
   <a href=".html">Referenzen</a>
   <a href=".html">Qulität, Sicherheit und Weiterbildung</a>
</ul>
</li>
</div>

<div class="slideshow"> 
   <img src="panorama.jpg">
   <img src="panorama.jpg">
   <img src="panorama.jpg">
</div>

<p style="text-align:left;">
     Die A.Willi A.G ist als Personalverleiher in der gesamten Schweiz und im Ausland erfolgreich tatig mit über 30-jahrige Erfahrung in dieser Sparte. 
</p>

<footer class="footer-distributed"> <!--LEFT LOGO FOOT-->
<div class="footer-left"> 
   <img src="awlogocolor.png" height="50" width="250" alt="A.Willi A.G" />   
   <p class="footer-links">     <!--LINKS-->
   <a href="#">Home</a>·
   <a href="#">Zertifikate</a>·
   <a href="#">Datenschutz-Bestimmungen</a>·
   <p class="footer-company-name">&copy;2016 A.Willi A.G</p>
</div>

<div class="footer-center"> <!--CENTER-->
<div>
   <i class="fa fa-map-marker"></i>
   <p><span>Wasgenring 94</span> CH-4055 Basel</p>
</div>
<div>
   <i class="fa fa-phone"></i>
   <p><span>Fax +41 (0)61 856 14 38</span>Tel. +41 (0)61 646 18 18<span>info@awilli-ag.ch</span></p>
</div>
<div>
   <i class="fa fa-envelope"></i>
</div>
</div>

<div class="footer-right"> <!--RIGHT-->
<div class="slideshow2"> 
    <p><font color="white">Wir möchten uns bei all unseren Kunden bedanken.</font></p>
   <img src="lehman.png" height="50" width="50">
   <img src="jc.png" height="50" width="50">
   <img src="iwb.png" height="50" width="50">

</div>
</div>
</footer>            
</body> 
</div>
</html>

CSS 的CSS

body     
/* font & back clr */
{ font-family: verdana; background:whitesmoke ; color:black; }

.menu { 
    background: black; 
    width:100%;
}

ul {
    list-style-type: none;
    margin: 0 auto;
    display:table;
    padding: 0;
    z-index: 100;
    overflow: hidden;
}

.logo {
    height:   
    bottom: 0;
    position: relative;
} 

li {
    float: left;
}

/* DROPDOWN Txt Color */
li a, .dropbtn {
    display: inline-block;
    color: whitesmoke;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}


/* DROPDOWN Txt BOX Color */
li a:hover, .dropdown:hover .dropbtn {
    background-color: #33383b;
}

li.dropdown {
    display: inline-block;
}


/* DROPDOWN content clr */    
.dropdown-content {
    display: none;
    position: absolute;
    background-color: whitesmoke;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 100;
}

/* DROPDOWN TEXT CLR */    
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

/* DROPDOWN COL BOX */
.dropdown-content a:hover {
    background-color: whitesmoke
}

.dropdown:hover .dropdown-content {
    display: block;
}

        @keyframes fade {
        0%   { opacity: 0; }
        11.11%   { opacity: 1; }
        33.33%  { opacity: 1; }
        44.44%  { opacity: 0; }
        100% { opacity: 0; }
}

/* MENU COL */
.menu { 
  position: relative;
  z-index: 0;
  height: 2.9em;
  margin-bottom: -0.4em;
  margin-top: 0em;
  z-index:1000;

  background-color:#33383b;
}



/* slideshow header */    
.slideshow { 
    position: relative;
    z-index: ;
    width: 100%;
    top: 0;
    box-sizing: border-box;
    height: 250px;
    max-width: 100%;
    bottom: 20px;
  }

.slideshow img{
    margin:0 auto;
    width: 100%;
    max-height: 100%;
}

.slideshow img { position:absolute; left:0; right:0; opacity:0; animation-name: fade; animation-duration: 9s; animation-iteration-count: infinite; }
    .slideshow img:nth-child(1) { animation-delay: 0s;  }
    .slideshow img:nth-child(2) { animation-delay: 3s;  }
    .slideshow img:nth-child(3) { animation-delay: 6s;  }


/* slideshow2 header */
.slideshow2 { 
    position: relative;
    z-index: 1;
    width: 150px;
    top: 0em;
    box-sizing: border-box;
    height: 40px;
    max-width: 100%;
    bottom: 20px;
 }

.slideshow2 img{
    margin:0 auto;
    width: 100%;
    max-height: 100%;
}

.slideshow2 img { position:absolute; left:0; right:0; opacity:0; animation-name: fade; animation-duration: 9s; animation-iteration-count: infinite; }
    .slideshow2 img:nth-child(1) { animation-delay: 0s;  }
    .slideshow2 img:nth-child(2) { animation-delay: 3s;  }
    .slideshow2 img:nth-child(3) { animation-delay: 6s;  }

/* page container */

.container {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* article from jobs */
.article {
    text-align: left;
    height: 200px;
    margin-bottom:11px
}

/* body of text */
textinfo {
   width: 300px;
   border: 25px solid green;
   padding: 25px;
   margin: 25px;
}      
/* footer opts */
.footer-distributed{
     background-color: #292c2f;
     box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.12);
     box-sizing: border-box;
     width: 100%;
     text-align: left;
     font: 15px verdana; 
     padding: 30px 30px;
     margin-top: 100px;
}

.footer-distributed .footer-left,
.footer-distributed .footer-center,
.footer-distributed .footer-right{
    display: inline-block;
    vertical-align: top;
}

/* footer left */

.footer-distributed .footer-left{
    width: 40%;
}

/* the company logo */

.footer-distributed h3{
    color:  #ffffff;
    font: normal 15px 'Verdana', cursive;
    margin: 0;
}

.footer-distributed h3 span{
    color:  #5383d3;
}

/* footer links */

.footer-distributed .footer-links{
    color:  #ffffff;
    margin: 20px 0 12px;
    padding: 0;
}

.footer-distributed .footer-links a{
    display:inline-block;
    line-height: 1.8;
    text-decoration: none;
    color:  inherit;
}

.footer-distributed .footer-company-name{
    color:  #8f9296;
    font-size: 15px;
    font-weight: normal;
    margin: 0;
}

/* footer center */

.footer-distributed .footer-center{
    width: 35%;
}

.footer-distributed .footer-center i{
    background-color:  #33383b;
    color: #ffffff;
    font-size: 15px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    text-align: center;
    line-height: 42px;
    margin: 10px 15px;
    vertical-align: middle;
}

.footer-distributed .footer-center i.fa-envelope{
    font-size: 17px;
    line-height: 38px;
}

.footer-distributed .footer-center p{
    display: inline-block;
    color: #ffffff;
    vertical-align: middle;
    margin:0;
}

.footer-distributed .footer-center p span{
    display:block;
    font-weight: normal;
    font-size:14px;
    line-height:2;
}

.footer-distributed .footer-center p a{
    color:  #5383d3;
    text-decoration: none;;
}


/* footer right */

.footer-distributed .footer-right{
    width: 20%;
}

.footer-distributed .footer-company-about{
    line-height: 20px;
    color:  #92999f;
    font-size: 15px;
    font-weight: normal;
    margin: 0;
}

.footer-distributed .footer-company-about span{
    display: block;
    color:  #ffffff;
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 20px;
}

.footer-distributed .footer-icons{
    margin-top: 25px;
}

.footer-distributed .footer-icons a{
    display: inline-block;
    width: 35px;
    height: 35px;
    cursor: pointer;
    background-color:  #33383b;
    border-radius: 2px;

    font-size: 15px;
    color: #ffffff;
    text-align: center;
    line-height: 35px;

    margin-right: 3px;
    margin-bottom: 5px;
}

/* un responsive rmoval */

@media (max-width: 880px) {

    .footer-distributed{
        font: bold 14px sans-serif;
    }

    .footer-distributed .footer-left,
    .footer-distributed .footer-center,
    .footer-distributed .footer-right{
        display: block;
        width: 100%;
        margin-bottom: 40px;
        text-align: center;
    }

    .footer-distributed .footer-center i{
         margin-left: 0;
    }


logo {        
    margin-bottom:100px;
}

change the amount of bottom margin your .logo h1 has. 更改您的.logo h1的底边距数量。

.logo h1 {
    margin-bottom:0;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM