Reputation: 59
I am really new to bootstrap, and I got kind of frustrated with it. I am trying to build a responsive website, and I need my logo to overflow navbar. I did it in html and css(Without using bootstrap), but it is not responsive. This is what I want to do with bootstrap but I keep failing miserably. http://prntscr.com/5tifol This is html/css code:
`<body>
<div id="motodiv">
<div id="text1" style="display:none;">TEXTTEXTTEXTTEXTTEXT</div>
<div id="text2" style="display:none;">TEXTTEXTTEXTTEXTT</div>
</div>
<div id="logo"><img id="logoimg" src="logo.png"></div>`
http://jsfiddle.net/yn7o2neb/ And this is what I did with bootstrap http://prntscr.com/5tifrp This is bootstrap code: `
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/index.css" rel="stylesheet">
</head>
<body>
<div class = "navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="index.html"> <img src="images/logo.png" class="img-responsive clearfix logo"></a>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>`
http://jsfiddle.net/oc5vgha4/ Any help is welcome. Also, the navbar is resizing when I try to resize image.
Upvotes: 3
Views: 2873
Reputation: 1291
Try this CSS on the .navbar-brand
class
.navbar-brand {
position: absolute;
left: 0px;
top: 0px;
width: 50px;
margin-left: 0px;
padding: 30px;
}
You can adjust the padding and even the positioning as you see fit. You can see my example on http://jsfiddle.net/0hmrd1b8/
I hope this helps!
Upvotes: 2