所以我也是一个CSS的菜鸟,我对如何使我的标志居中感到困惑。它适用于我的页脚,但不适用于我的文字/徽标。
另外,如何修复页脚左侧的那个小点,我已经将 .footer 宽度设置为 100%。
谢谢!
截屏:
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Konvoy</title>
<link href='http://fonts.googleapis.com/css?family=Lato:300,400' rel='stylesheet' type='text/css'>
<!-- <link rel='stylesheet' href="/css/normalize.css"> -->
<link rel="stylesheet" href="/css/bootstrap-responsive.min.css">
<link rel="stylesheet" href="/css/index.css">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4/leaflet.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<div class="container">
<header> <!--<div id="logo">--> <h1><img src="/assets/Konvoy Logo.png" width="350"/> <!--</div>--> </h1>
<div class="description" style="margin-top: 0px;">See each other in any situation. Geolocation App For Everyone.</div>
</header>
<div class="content">
</div>
<!-- <div class="app">
<div id="infobox" class="infobox"></div> -->
<!-- <div id="map">To get this app to work you need to share your geolocation.</div>
</div> -->
</div>
<div class="footer" style="padding-top: 30px;"><center> 2013 All Rights Reserved. Team Konvoy </div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script src="/js/lib/leaflet.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script src="/js/application.js"></script>
</body>
</html>
CSS:
html, body {
height: 100%;
background: url('../assets/landing_page_bg.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
color: #666;
@font: 14px/18px 'Bariol', Arial, sans-serif;
}
.container{
}
header {
text-align: center;
position: center;
width: 100%;
padding-top: 150px;
}
.description {
font-weight: 300;
font: 24px 'Bariol', Arial, sans-serif;
color: #006794;
text-align: center;
}
.content {
}
.footer {
clear: both;
position: fixed;
height: 80px;
width: 100%;
background-color: #039686;
font: 16px 'Helvetica', Arial, sans-serif;
color: #FFFFFF;
font-weight: 100;
}