Как мне убрать мое меню из моего текста - PullRequest
0 голосов
/ 22 апреля 2009

Как у меня есть пробел между заголовком моего меню и моим текстом? И это хорошая практика?

div.body
{
    width: 6.5in;
    margin:0px auto;
    text-align:left;
}

.menu ul{
    margin:0px auto;
    }
.menu li{
    width: 25%;
    text-align:center;
    display:block;
    float:left;
    }
.menu a{
    display:block;
    }

HTML:

<html>
<head>
<link rel="stylesheet" type="text/css" href="my.css" />
</head>
<body>

<div>
    <div class="menu">
    <ul>
    <li><a href="">Home</a></li>
    <li>Test</li>
    <li>Test 2</li>
    <li>Contact</li>
    </ul>
    </div>
</div>


<div class="body">
lots of textlots of textlots of textlots of textlots of textlots of textlots of textlots of text
<the above repeated many times>

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

1 Ответ

1 голос
/ 22 апреля 2009

Установить верхнее поле для вашего текста:

div.body
{
  width: 6.5in;
  margin: 10px auto 0px auto;
  text-align: left;
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...