私は自分のウェブサイトの上部にヘッダーを修正しようとしていますが、私はposition:fixedを使用しています。ヘッダーが左にシフトしており、ページの残りのコンテンツが上がっています。私はz-indexを試していますが、まだヘッダが左側にパディングされています。だれでも解決策を見つけるのに助けてください。CSSを使用している固定ヘッダー
おかげ
<body>
<div class="header_area ">
<div class=" header ">
<div class="logo floatleft">
<img src="images/2016.png" alt="logo" width='100%' align="middle" style="border:5px solid white"/>
</div>
<div class="mainmenu floatright ">
<nav class="main-navigation pull-right hidden-xs hidden-sm">
(now some list there)
.header_area{}
.header
{
position: fixed;
z-index:1000;
padding: 10px 0;
margin: 0 auto;
transition: all 1.3s ease 0s;
-moz-transition: all 1.3s ease 0s;
-webkit-transition: all 1.3s ease 0s;
-o-transition: all 1.3s ease 0s;
-ms-transition: all 1.3s ease 0s;
}
body{
padding: 20px 10px;
font-family: sans-serif, open-sans;
font-size:14px;line-height:20px;color:#414141;
}
nav.main-navigation {
position: relative;
z-index: 9999;
font-family: bebasregular;
}
試し:マージントップから、上マージンからは、特定の位置 – Vaibhav