如何让更高的"搁置"和" topnav"?

时间:2017-11-24 18:52:34

标签: html css html5 css3

我尝试使用" top"和"底部"但它没有用。我该如何解决?

Site

It must to look like on this photo

HTML/CSS Code



ng-model

nav {
    float: left;
    width: 100%;
    
}

 .News {
    color: #6a70b3;
    font-family: verdana, arial, helvetica, "sans-serif";
    font-size: 12.3333px;
    line-height: 17px;
    font-weight: 700;
    text-align: left;
    margin-right: 50%;
    padding-top: 2%;
    padding-left: 14%;
}

section { /*Контент*/
    font-family: Arial;
    color: #000000;
    font-size: 12.8px;
    float: left;
    width: 75%;
}

section a:visited {
    color:#003399;
}

section a:hover {
    color: black;
}

aside { /*Sidebar*/
    padding: 5% 0.5%;
    margin: 0% auto;
    width: 20%;
    background-image: url(../images/side.PNG);
    background-repeat: repeat-y;
    background-size: auto;
    float: left;
}

aside li { /*Sidebar Список */
    font-family: Verdana, Arial , "sans-serif", helvetica;
    font-size: 11px;
    margin-bottom: 5%;
    width: 70%;
    font-weight: 700;
    text-align: left;
    line-height: 15px;
    z-index: 2;
    
}
/* Стиль верхней панели навигации */
.topnav {
    margin: 6.2%;
    margin-left: 20%;
    width: 80%;
    top: 20%;
    background-color: red;
    text-align: center;
    float: left;
    
}

/* Стиль ссылок навигации */
.topnav a {
    margin:0 auto;
    display:inline;
    margin-left:3px;
    margin-top: 3px;
    line-height: 7px;
    font-size: 11px;
    font-weight: 700;
    float:left;
    font-family: verdana, "sans-serif", helvetica, arial;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 5px 10px;
    text-decoration: none;
    z-index: 3;
}

/* Изменение цвета при наведении */
.topnav a:hover {
    color: orange;
}

ul {
    list-style-type: none; /* Убираем маркеры */
    text-decoration: none; /* Убираем подчёркивание */
    margin-left: 0; /* Отступ слева в браузере IE и Opera */
    padding-left: 0; /* Отступ слева в браузере Firefox, Safari, Chrome */
}

ul a{
    list-style-type: none;
    text-decoration: none;
    color: darkblue;
}

ul a:hover{
    list-style-type: none;
    text-decoration: none;
    color:orange;
}

#mainText {
    text-align: center;
}

.border {
    color:black;
}

table, th, td {
    border: 1px solid black;
}

footer { /*Подвал*/
        width: 100%;
    text-align: center;
    float: left;
}

footer a{
    font-family: Arial;
    font-size: 10.6667px;
    line-height: 14px;
    font-weight: 400;
    text-decoration: none;
    color:#06C;
}

.footerline {
    position: fixed;
    bottom: 1px;
    left: 0px;
    float: none;
}




1 个答案:

答案 0 :(得分:0)

您需要在CSS中定义位置,就像在.footerline中一样:)