Problem: Leerzeichen zwischen .nav
und .jumbotron
im Bootstrap.Der Abstand zwischen NAV und Jumbotron kann nicht überschrieben werden
was habe ich getan: override die bootstrap.css, override .jumbotron{margin-bottom:0px}
, es funktioniert nicht.
Was ich gefunden habe: Es funktioniert gut, wenn ich es in der Originaldatei debuggen.
couldn't work in override css file
HTML:
<body>
<div class="header">
<div class="top-header">
<div class="jumbotron">
<img src="image/name.png" alt="">
<h2>Curiosity Creative</h2>
</div><!--Jumbotron-->
</div><!--top-header-->
<nav class="navbar navbar-default">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#displayItem" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div><!--navbar-header-->
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="displayItem">
<ul class="nav nav-tabs">
<li class="home active">
<a href="index.html"><i></i> Home</a></li>
<li class="me">
<a href="aboutMe.html"><i></i>AboutMe</a></li>
<li class="blog">
<a href="Blog.html"><i></i>Blog</a></li>
<li class="contact">
<a href="Contact.html"><i></i>Contact</a></li>
</ul>
</div> <!-- collapse navbar-collapse-->
</div><!--container -->
</nav><!--nav-->
</div>
CSS:
*{
margin: 0;
padding: 0;
}
body{
background: url("../image/body_bg.jpg");
overflow: scroll;
}
div{
position:relative;
}
.top-header{
background-color: white;
}
.jumbotron {
background-color:transparent !important;
text-align: center;
margin-bottom:0px;
}
.jumbotron img{
width: 400px;
}
.jumbotron h2{
color: #aaa;
font-size: 13px;
font-family: verdana;
}
Hallo Leute, ist jemand mir sagen, warum es nicht funktioniert, wenn ich es außer Kraft setzen. SOS ..... – 4CODE
Vielleicht kann Ihnen das helfen: http://stackoverflow.com/questions/20727020/remove-padding-in-jumbotron-bootstrap-3 –
Was passiert, wenn Sie die Spezifität des übergeordneten '.jumbotron erhöhen 'Regel? Zum Beispiel: '.top-header .jumbotron {margin-bottom: 0px;}' –