Reputation: 4441
I have text next to a hyperlink that need to be on the same line in the footer. It works perfectly when responsive doesn't kick into mobile mode.
I have all of the code in navbar-header
, the inline-block
works just fine until mobile.
What am I doing wrong?
Footer HTML:
<div class="navbar navbar-inverse navbar-fixed-bottom">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-2">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class='navbar-text' style='margin-left: 15px;'>Test - 426482 - Demo</div> <ul class='nav navbar-nav'><li style='display: inline-block;'><a href='console.php' target='_blank'>Console</a></li></ul>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-2">
<ul class='nav navbar-nav'>
</ul>
<ul class="nav navbar-nav navbar-right">
<div class='form-group'>
<form action='logout.php' method='post' class='navbar-form ajaxform'>
<input type='text' name='fullUrl' hidden='true' id='fullUrl' value="">
<input type="submit" style="clear: left; width: 100%;" class='btn btn-primary' name="commit" value="Logout" />
</form>
</div>
</ul>
</div>
</div>
</div>
Footer Normal Version (formatted correctly):
Footer Mobile Version (need same line):
Upvotes: 0
Views: 269
Reputation: 6820
Forget what I mentioned above. If you use the navbar-brand
class on your "Test - 426482 - Demo" and "Console" it is much easier to achieve what you want. Take a look at the demo I made here.
EDIT: Updated link here
<div class="navbar navbar-inverse navbar-fixed-bottom">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-2">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-text" style="float: left;">Test - 426482 - Demo</span>
<a class="navbar-text" style="float: left; margin-left: 15px;" href="console.php" target="_blank">Console</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-2">
<ul class='nav navbar-nav'>
</ul>
<ul class="nav navbar-nav navbar-right">
<div class='form-group'>
<form action='logout.php' method='post' class='navbar-form ajaxform'>
<input type='text' name='fullUrl' hidden='true' id='fullUrl' value="">
<input type="submit" style="clear: left; width: 100%;" class='btn btn-primary' name="commit" value="Logout" />
</form>
</div>
</ul>
</div>
</div>
</div>
Upvotes: 1