Bootstrap 3.0 Height 100% not working - html

I've set everything I need 100% to to 100% height but the sidebar still refuses to got to the bottom of the page when using Bootstrap 3.0. I've used the -9999px trick but that knocks out the dropdown I have in the navigation above it so I can't use that fix.
What I've tried instead is:
<div class="row-fluid fill">
<nav class="col-lg-2 fill">
<a class="btn btn-link" href="#"><span class="glyphicon glyphicon-piggy-bank navicon" aria-hidden="true"></span> Animal Care</a><br />
<a class="btn btn-link" href="#"><span class="glyphicon glyphicon-user navicon" aria-hidden="true"></span> Customers</a><br />
<a class="btn btn-link" href="#"><span class="glyphicon glyphicon-gift navicon" aria-hidden="true"></span> Donations</a><br />
<a class="btn btn-link" href="#"><span class="glyphicon glyphicon-calendar navicon" aria-hidden="true"></span> Events</a><br />
<a class="btn btn-link" href="#"><span class="glyphicon glyphicon-screenshot navicon" aria-hidden="true"></span> Marketing</a><br />
<a class="btn btn-link" href="#"><span class="glyphicon glyphicon-briefcase navicon" aria-hidden="true"></span> Staff Mangement</a><br />
<a class="btn btn-link" href="#"><span class="glyphicon glyphicon-globe navicon" aria-hidden="true"></span> Web Maintenance</a><br />
<a class="btn btn-link" href="#"><span class="glyphicon glyphicon-shopping-cart navicon" aria-hidden="true"></span> Products & Stock</a><br />
</nav>
<div class="col-lg-10 content fill">
<h1>Dashboard</h1>
<ul class="breadcrumb">
<li class="active">Home</li>
</ul>
<div class="row-fluid">
<div class="col-lg-4 zookeeper excount">
10
</div>
<div class="col-lg-4 birdofprey excount">
10
</div>
<div class="col-lg-4 otherex excount">
1
</div>
</div>
<div class="row-fluid">
<div class="col-lg-4 exlabel">
Zoo Keeper Experiences
</div>
<div class="col-lg-4 exlabel">
Bird of Prey Experiences
</div>
<div class="col-lg-4 exlabel">
Other Events
</div>
</div>
<div class="row-fluid">
<div class="col-lg-12 dashtoday">
<h2>Today - 17th March 2015</h2>
<div role="tabpanel">
<ul class="nav nav-tabs" role="tablist" id="dashTabs">
<li role="presentation" class="active">To-Do</li>
<li role="presentation">Keeper Log</li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane fade in active" id="todo">
<ul class="nav nav-pills nav-stacked dashtodo">
<li class="active todoitem">
To-Do Item Outstanding
</li>
<li class="active todoitem">
To-Do Item Outstanding
</li>
<li class="disabled">
To-Do Item Complete
</li>
<li class="active todoitem">
To-Do Item Outstanding
</li>
<li class="active todoitem">
To-Do Item Outstanding
</li>
<li class="active todoitem">
To-Do Item Outstanding
</li>
</ul>
</div>
<div role="tabpanel" class="tab-pane fade" id="keeperlog">
<ul class="nav nav-pills nav-stacked dashtodo">
<li class="active todoitem">
To-Do Item Outstanding
</li>
<li class="disabled">
To-Do Item Complete
</li>
<li class="disabled">
To-Do Item Complete
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
And the CSS I've added to Boostrap for the height is:
html, body {
height: 100%;
}
.fill {
min-height: 100%;
height: 100%;
}

The culprit was a form tag that has been inserted automatically by ASP.Net to render the controls. The simple fix was to change the CSS to:
html, body, form {
height: 100%;
}
.fill {
min-height: 100%;
height: 100%;
}
The height now works as expected

Related

Bootstrap Tabs Float Image Right

I've got a basic nav-tabs in Twitter Bootstrap and I've got an image after all of my tabs, that I'd like to float right. I've tried modifying its float, text-align, and other attributes, and even the pull-right class as mentioned on a separate but related SO question.
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="stuff-tab" data-toggle="tab" href="#stuff" role="tab" aria-controls="stuff" aria-selected="true">Stuff</a>
</li>
<!-- ... -->
<img class="pull-right text-right float-right" src="myimg.png" width="32px" height="32px">
What Bootstrap class or CSS should I write to make my image float to the right?
(Bootstrap 4 if that matters)
<nav class="navbar header navbar-light bg-dark" id="myHeader">
<div class="container">
<p class="">logo</p>
// from here you get all elements on right side
<ul class="list-inline">
<li class="list-inline-item">
<div class="frqst">
<button class="fas fa-users btn text-white"></button>
<div>
<ul class="list-group">
<li class="border-bottom">
<p>first right item
</p>
</li>
</ul>
</div>
</div>
</li>
<li class="list-inline-item">
<button class="fas fa-comment btn text-white">second right item</button>
</li>
<li class="list-inline-item">
<p>third right item</p>
</li>
<li class="list-inline-item">
<img src="../../myimg.jpg">
</li>
<li class="list-inline-item">
<a class="text-white" href="./models/logout.html">Logout</a>
</li>
</ul>
</div>
</nav>
Put a div tag around the image and use d-flex justify-content-end like this:
<div class="row">
<div class="col-md-12">
<div class="">
<div class="">
<ul class="nav nav-pills w-100">
<li class="nav-item">
<a class="nav-link active" id="stuff-tab" data-toggle="tab" href="#stuff" role="tab"
aria-controls="stuff" aria-selected="true">Stuff</a>
</li>
</ul>
</div>
<div class="d-flex justify-content-end">
<img src="https://cdn.searchenginejournal.com/wp-content/uploads/2019/09/f46bc1a6-9ffa-4434-a77a-ea1491d3597a-760x400.jpeg"
class="">
</div>
</div>
</div>
</div>
I tested this. Should work.
Another you can try:
<div class="col-md-12" style="border-top: 2px solid #000;">
<div class="mx-4">
<div class="footer pt-3">
<div class="row">
<div class="col-md-6">
<ul>
<li class="nav-item">
<a class="nav-link active" id="stuff-tab" data-toggle="tab" href="#stuff" role="tab" aria-controls="stuff"
aria-selected="true">Stuff</a>
</li>
</ul>
</div>
<div class="col-md-6">
<div class="float-right">
<img class="pull-right text-right float-right" src="http://placekitten.com/301/301" width="32px" height="32px">
</div>
</div>
</div>
</div>
</div>
</div>

Bootstrap collapse not working on nested unordered list

I've been having some issues on getting elements of a nested unordered list to collapse and expand.
While the first element functions correctly but subsequent elements don't appear to work. I'm I missing a class or something similar?
Please see attached working example code demonstrating the issue i have.
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<ul class="list-group list-group-flush">
<li class="list-group-item list-group-item-action">
<a href="#f1499360-b771-487a-9d84-e399f69f4568" data-toggle="collapse" class="" aria-expanded="true">
<h3>Test Site</h3>
</a>
<div class="collapse show" id="f1499360-b771-487a-9d84-e399f69f4568" style="">
<ul class="list-group">
<li class="list-group-item">
<a href="#c6f8ebd3-5a92-461d-a37b-dcf314897361" data-toggle="collapse" class="" aria-expanded="true">
<h5>132</h5>
</a>
<div class="collapse show" id="c6f8ebd3-5a92-461d-a37b-dcf314897361" style="">
<ul class="list-group">
<li class="list-group-item">
<a href="#e867a283-4dee-44fa-884a-6b7cf7cc42fe" data-toggle="collapse" class="" aria-expanded="true">
<h5>Hello</h5>
</a>
<div class="collapse show" id="e867a283-4dee-44fa-884a-6b7cf7cc42fe" style="">
<ul class="list-group">
<li class="list-group-item">
<h6>Direct Connect Drive Status</h6>
<div class="float-left">Drive 1:</div>
<div class="float-right">Float right on all viewport sizes</div><br>
<div class="float-left">Drive 2:</div>
<div class="float-right">Float right on all viewport sizes</div><br>
<div class="float-left">Drive 3:</div>
<div class="float-right">Float right on all viewport sizes</div><br>
<div class="float-left">Drive 4:</div>
<div class="float-right">Float right on all viewport sizes</div><br>
</li>
</ul>
</div>
</li>
<li class="list-group-item">
<a href="#50e71ff4-7ef5-4b2e-8615-cdfe328320a9" data-toggle="collapse">
<h5>name 2</h5>
</a>
<div class="collapse" id="50e71ff4-7ef5-4b2e-8615-cdfe328320a9">
<ul class="list-group">
<li class="list-group-item">
<h6>Direct Connect Drive Status</h6>
<div class="float-left">Drive 1:</div>
<div class="float-right">Float right on all viewport sizes</div><br>
<div class="float-left">Drive 2:</div>
<div class="float-right">Float right on all viewport sizes</div><br>
<div class="float-left">Drive 3:</div>
<div class="float-right">Float right on all viewport sizes</div><br>
</li>
</ul>
</div>
</li>
<li class="list-group-item">
<a href="#4c6fc729-78b4-4d06-bbdd-749c96cafd05" data-toggle="collapse">
<h5>Test Assign</h5>
</a>
<div class="collapse" id="4c6fc729-78b4-4d06-bbdd-749c96cafd05">
<ul class="list-group">
<li class="list-group-item">
<h6>Direct Connect Drive Status</h6>
<div class="float-left text-warning">Not Configured - Check Settings</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
<li class="list-group-item">
<a href="#5b2e25aa-c480-445b-91a6-a46f61291a51" data-toggle="collapse">
<h5>aaa</h5>
</a>
<div class="collapse" id="5b2e25aa-c480-445b-91a6-a46f61291a51">
<ul class="list-group">
<li class="list-group-item">
<a href="#cd2a0ea7-1935-4546-9b2a-c9a3fa9ffb47" data-toggle="collapse">
<h5>Station module 2</h5>
</a>
<div class="collapse" id="cd2a0ea7-1935-4546-9b2a-c9a3fa9ffb47">
<ul class="list-group">
<li class="list-group-item">
<h6>Direct Connect Drive Status</h6>
<div class="float-left text-warning">Not Configured - Check Settings</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</body>
</html>
Using element id's that start with numbers won't work. Rename the id's, or prepend a non-numeric char such as _...
Demo: https://www.codeply.com/go/1xEVX8Ye2u
<ul class="list-group">
<li class="list-group-item">
<a href="#c6f8ebd3-5a92-461d-a37b-dcf314897361" data-toggle="collapse" class="" aria-expanded="true">
<h5>132</h5>
</a>
<div class="collapse show" id="c6f8ebd3-5a92-461d-a37b-dcf314897361" style="">
<ul class="list-group">
<li class="list-group-item">
<a href="#e867a283-4dee-44fa-884a-6b7cf7cc42fe" data-toggle="collapse" class="" aria-expanded="true">
<h5>Hello</h5>
</a>
<div class="collapse show" id="e867a283-4dee-44fa-884a-6b7cf7cc42fe" style="">
<ul class="list-group">
<li class="list-group-item">
...
</li>
</ul>
</div>
</li>
<li class="list-group-item">
<a href="#_50e71ff4-7ef5-4b2e-8615-cdfe328320a9" data-toggle="collapse">
<h5>name 2</h5>
</a>
<div class="collapse" id="_50e71ff4-7ef5-4b2e-8615-cdfe328320a9">
<ul class="list-group">
<li class="list-group-item">
...
</li>
</ul>
</div>
</li>
<li class="list-group-item">
<a href="#_4c6fc729-78b4-4d06-bbdd-749c96cafd05" data-toggle="collapse">
<h5>Test Assign</h5>
</a>
<div class="collapse" id="_4c6fc729-78b4-4d06-bbdd-749c96cafd05">
<ul class="list-group">
<li class="list-group-item">
...
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
<li class="list-group-item">
<a href="#5b2e25aa-c480-445b-91a6-a46f61291a51" data-toggle="collapse">
<h5>aaa</h5>
</a>
<div class="collapse" id="5b2e25aa-c480-445b-91a6-a46f61291a51">
<ul class="list-group">
<li class="list-group-item">
<a href="#cd2a0ea7-1935-4546-9b2a-c9a3fa9ffb47" data-toggle="collapse">
<h5>Station module 2</h5>
</a>
<div class="collapse" id="cd2a0ea7-1935-4546-9b2a-c9a3fa9ffb47">
<ul class="list-group">
<li class="list-group-item">
...
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>

Showing notification window in mobile view

in my app, i have a notification popup window that shows the latest messages, my example does not show opening, but that isnt the main of the conversation, the problem is that wwhen i resize the window, by button link with the bell notification on the right disapears, when it should be showing always, even in mobile.
The toggle menu appears has should it be, but in mobile view the bell link menu notifcation should appear at his side.
Whats wrong with my html code? Im using bootstrap
Ex:https://codepen.io/anon/pen/mmxQwO?editors=1010
Html:
<!-- Static navbar -->
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Project name</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active">Home</li>
<li>About</li>
<li>Contact</li>
<li class="dropdown">
Dropdown <span class="caret"></span>
<ul class="dropdown-menu">
<li>Action</li>
<li>Another action</li>
<li>Something else here</li>
<li role="separator" class="divider"></li>
<li class="dropdown-header">Nav header</li>
<li>Separated link</li>
<li>One more separated link</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown ng-isolate-scope">
<a id="dLabel" role="button" class="icon-wrapper" data-toggle="dropdown" ng-click="notificationCtrl.updateDateTime()" data-target="#">
<i class="fa fa-bell-o"><span class="badge-notification ng-binding ng-hide" ng-show="notificationCtrl.nrNotifications > 0"> 0</span></i>
<div class="clearfix"></div>
</a>
<ul class="dropdown-menu notifications" role="menu" aria-labelledby="dLabel">
<li class="dropdown-header">
Notificações
</li>
<div class="notifications-wrapper">
<!-- ngRepeat: notification in notificationCtrl.notifications | limitTo: 5 --><a ng-repeat="notification in notificationCtrl.notifications | limitTo: 5 " class="content ng-scope" href="">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 notification-grid item-title notification-item">
<div class="col-lg-10 col-md-10 col-sm-10 col-xs-10 notification-grid">
<!-- USER -->
<strong class="ng-binding"></strong>
<!-- ngIf: notification.operation == 'first_register' -->
<!-- NOTIFICAÇÔES -->
<div>
<i class="fa fa-clock-o"><span class="item-info ng-binding"> há 2 meses atrás</span></i>
</div>
</div>
</div>
</a><!-- end ngRepeat: notification in notificationCtrl.notifications | limitTo: 5 --><a ng-repeat="notification in notificationCtrl.notifications | limitTo: 5 " class="content ng-scope" href="">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 notification-grid item-title notification-item">
<div class="col-lg-10 col-md-10 col-sm-10 col-xs-10 notification-grid">
<!-- USER -->
<i class="fa fa-clock-o"><span class="item-info ng-binding"> há 2 meses atrás</span></i>
</div>
</div>
</div>
</a>
</div>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>

Bootstrap lists inside panel are not responsive

I'm creating the menu of a page in bootstrap 3.
This is my panel I have cretaed.
Here is my code of a panel I created:
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10">
<div class="panel mepanelo">
<div class="row ">
<div class="col-md-4 big_list">
<ul class="list1">
<li><a class="btn" role="button" href="figurini.php">Figurini</a>
</li>
<li><a class="btn" role="button" href="mezzi.php">Mezzi Militari</a>
</li>
<li><a class="btn" role="button" href="accessori.php">Accessori</a>
</li>
<li><a class="btn" role="button" href="strumenti.php">Strumenti</a>
</li>
</ul>
</div>
<div class="col-md-4 big_list">
<ul class="list1 ">
<li><a class="btn" role="button" href="fantasy.php">Fantasy</a>
</li>
<li><a class="btn" role="button" href="aerei.php">Aerei</a>
</li>
<li><a class="btn" role="button" href="ambientazioni.php">Ambientazioni</a>
</li>
<li><a class="btn" role="button" href="edizioni.php">Edizioni</a>
</li>
</ul>
</div>
<div class="col-md-4 big_list">
<ul class="list1">
<li><a class="btn" role="button" href="busti.php">Busti</a>
</li>
<li><a class="btn" role="button" href="navi.php">Navi</a>
</li>
<li><a class="btn" role="button" href="colori.php">Colori</a>
</li>
<li><a class="btn" role="button" href="occasioni.php">Occasioni</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="col-md-1"></div>
</div>
</div>
This panel and the lists inside it are responsive but the problem is that when the page is in the size of a tablet here is how the lists appear:
I don't want all that blank gray space there but I want all the elements to appear in 2 lists for tablet and not in one list. I proved something like hidden-sm but this hides the things. Is there a way to put all the eleemts which are in three lists just in 2 lists for tablet? Thanks!
use <div class="col-md-4 col-sm-4 big_list"> instead of <div class="col-md-4 big_list">
Change the class from col-md to col-sm
<div class="col-md-4 big_list">
to
<div class="col-sm-4 big_list">
You need to hide 3rd list only on tablet (small devices) and adjust elements of that list in other 2 lists and show that elements only on small devices. Read comments in code. And for bootstrap hidden and visible classes Check this.
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10">
<div class="panel mepanelo">
<div class="row ">
<div class="col-md-4 col-sm-6 big_list">
<ul class="list1">
<li><a class="btn" role="button" href="figurini.php">Figurini</a>
</li>
<li><a class="btn" role="button" href="mezzi.php">Mezzi Militari</a>
</li>
<li><a class="btn" role="button" href="accessori.php">Accessori</a>
</li>
<li><a class="btn" role="button" href="strumenti.php">Strumenti</a>
</li>
<!-- follwing elements are hidden on all devices except small (tablets) -->
<li class="hidden-xs hidden-md hidden-lg">
<a class="btn" role="button" href="busti.php">Busti</a>
</li>
<li class="hidden-xs hidden-md hidden-lg">
<a class="btn" role="button" href="navi.php">Navi</a>
</li>
</ul>
</div>
<div class="col-md-4 col-sm-6 big_list">
<ul class="list1 ">
<li><a class="btn" role="button" href="fantasy.php">Fantasy</a>
</li>
<li><a class="btn" role="button" href="aerei.php">Aerei</a>
</li>
<li><a class="btn" role="button" href="ambientazioni.php">Ambientazioni</a>
</li>
<li><a class="btn" role="button" href="edizioni.php">Edizioni</a>
</li>
<!-- follwing elements are hidden on all devices except small (tablets) -->
<li class="hidden-xs hidden-md hidden-lg"><a class="btn" role="button" href="colori.php">Colori</a>
</li>
<li class="hidden-xs hidden-md hidden-lg" ><a class="btn" role="button" href="occasioni.php">Occasioni</a>
</li>
</ul>
</div>
<div class="col-md-4 hidden-sm big_list"> <!-- hidden on small devices -->
<ul class="list1">
<li><a class="btn" role="button" href="busti.php">Busti</a>
</li>
<li><a class="btn" role="button" href="navi.php">Navi</a>
</li>
<li><a class="btn" role="button" href="colori.php">Colori</a>
</li>
<li><a class="btn" role="button" href="occasioni.php">Occasioni</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="col-md-1"></div>
</div>
I think the only problem is you are not including the bootstrap engine. Please see to it that you have properly linked your bootstrap files. Once that is done, this code should work fine.
<div class="col-sm-4 big_list">

Align Navbar bottom-left

i'm working on this website and as you can see i've a vertical left navigation. How can i move the navigations link left-bottom (only on desktop) like this?
<header class="span3">
<div class="affix">
<div class="navbar span3">
<div class="navbar-inner">
<a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
<i class="icon-reorder"></i>
</a>
<a class="brand span2" href="index.html">
<img alt="" src="img/logo.png">
</a>
<nav class="nav-collapse collapse">
<ul class="nav">
<li class="nav-home active">Home</li>
<li class="nav-about">Philosophie</li>
<li class="nav-services">Menu</li>
<li class="nav-team">Team</li>
<li class="nav-reservation">Reservation und Öffnungszeiten</li>
<li class="nav-private">Private Dining</li>
<li class="nav-kontakt">Kontakt und Anreise</li>
</ul>
</nav>
</div><!-- /navbar-inner -->
</div><!-- /navbar -->
<!-- <aside class="span3 text-center hidden-phone">
<ul class="social inline">
<li><a class="btn btn-small" href="#"><i class="icon-facebook"></i></a></li>
<li><a class="btn btn-small" href="#"><i class="icon-twitter"></i></a></li>
<li><a class="btn btn-small" href="#"><i class="icon-linkedin"></i></a></li>
</ul>
</aside> -->
</div><!-- /affix -->
</header>
#media(min-width:1024px)
{
/* your style for desktop */
}