开发者

CSS empty margin to the left of the page

开发者 https://www.devze.com 2023-01-24 08:36 出处:网络
How can I make an empty margin to the left of my page? The screenshot is in http://jaakkospage.comyr.com/testi.php and CSS is the following:

How can I make an empty margin to the left of my page? The screenshot is in http://jaakkospage.comyr.com/testi.php and CSS is the following:

div.nav {
  text-align: center;
}

div.nav ul {
  background: #ADD8E6;
  border: 1px solid #999;
  display: inline-block;
  line-height: 2.5em;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  white-space: nowrap;
}

div.nav ul li {
  display: inline;
  margin: 0 1px;
  padding: 0;
}

div.nav ul li a {
  display: inline-block;
  padding: .5em;
  text-decoration: none;
  vertical-align: middle;
}

div.nav ul li a:hover {
  background-color: #48D1CC;
  color: #C0FFC0;
}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>     
<title>aaa</title>  <link type="text/css" rel="stylesheet" href="styles.css" /></head>  
<body> 
<div id="dokumentti">
<div class="nav">
<ul>
<li><a href="http://www.aaa.freehostingcloud.com/register.php">Rekisteröidy</a>  
</li><li><a href="http://www.aaa.freehost开发者_Go百科ingcloud.com/login.php">Kirjaudu sisään</a>  
</li></ul>
</div>
</div>
</body>
</html>


#dokumentti {
    margin-left: 100px;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消