Block content at the top of a hero-body with Bulma - html

I have a page with a fullheight hero element and I want to "stick" the content that is in <div class="hero-body"> on the top of its container beacuse as now it centers automatically and I don't want that (it's a dashboard...).
How I can do?
Thanks in advance.
This is like what I want:
This is currently my code:
<link href="https://cdn.jsdelivr.net/npm/bulma#0.9.1/css/bulma.min.css" rel="stylesheet"/>
<section class="hero is-fullheight-with-navbar">
<!-- Hero head: will stick at the top -->
<div class="hero-head">
<div class="container">
<div class="columns is-centered">
<div class="column is-four-fifths">
<nav class="navbar is-spaced" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="{{ url_for('home') }}">
<img src="{{ url_for('static', filename='images/logo-m.png') }}" alt="logo">
<span class="has-text-grey-dark"> by Artemis™</span>
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbarBasic" class="navbar-menu">
<div class="navbar-end">
<a class="navbar-item has-text-grey" href="{{ url_for('home') }}">Home</a>
<div class="navbar-item">
<a class="button is-primary is-rounded" href="{{ url_for('auth.login') }}">
<strong>Login</strong>
</a>
</div>
</div>
</div>
</nav>
</div>
</div>
</div>
</div>
<!-- Hero content: will be in the middle -->
<div class="hero-body">
<div class="container">
<div class="columns is-centered">
<div class="column is-narrow">
<aside class="menu">
<p class="menu-label">Servizi Arc</p>
<ul class="menu-list">
<li>
<i class="fas fa-project-diagram"></i> Actions™
<ul style="{{ 'display: block;' if 'actions' in request.path else 'display: none;' }}">
<li><a>Members</a></li>
<li><a>Plugins</a></li>
<li><a>Add a member</a></li>
</ul>
</li>
<a><i class="fas fa-shield-alt"></i> Security™ <span class="tag is-primary is-rounded">In arrivo</span></a>
</ul>
</aside>
</div>
<div class="column is-7">
<div class="box">
<h1 class="title has-text-weight-light">
Hello, <span class="has-text-weight-bold">username</span>.
</h1>
<p class="subtitle is-5 has-text-grey">Seleziona un servizio per continuare...</p>
</div>
</div>
</div>
</div>
</div>
<!-- Hero footer: will stick at the bottom -->
<div class="hero-foot">
<footer style="border-top: 1px solid hsl(0, 0%, 93%); padding-top: 1.7rem;">
<div class="container">
<div class="columns is-vcentered is-centered has-text-centered-mobile">
<div class="column is-narrow">
<img src="{{ url_for('static', filename='images/logo-s.png') }}" alt="logo">
</div>
<div class="column is-3">
<h5 class="title is-5 has-text-grey-light has-text-weight-normal is-italic">
Arc ha come obiettivo il creare un'ecosistema semplice ma potente per aiutarti a gestire tutte le tue operazioni.
</h5>
</div>
<div class="column is-4 is-narrow">
© 2020 RGBCraft & Artemis™.
<br>
<i>Tutti i diritti riservati.</i>
</div>
<div class="column is-narrow">
Sitemap
<ul>
<li><a class="has-text-grey" href="{{ url_for('home') }}">Home</a></li>
<li><a class="has-text-grey" href="{{ url_for('auth.login') }}">Login</a></li>
</ul>
</div>
</div>
</div>
</footer>
</div>
</section>

Add the following classes like below:
<div class="hero-body is-align-items-stretch"> <!-- the important class is here -->
<div class="container is-flex">
<div class="columns is-centered is-flex-grow-1">
<div class="column is-narrow">
....
</div>
<!-- the below one (is-align-self-center) is not mandatory if you don't want to center the banner -->
<div class="column is-7 is-align-self-center">
....
</div>
Full code
<link href="https://cdn.jsdelivr.net/npm/bulma#0.9.1/css/bulma.min.css" rel="stylesheet" />
<section class="hero is-fullheight-with-navbar">
<!-- Hero head: will stick at the top -->
<div class="hero-head">
<div class="container">
<div class="columns is-centered">
<div class="column is-four-fifths">
<nav class="navbar is-spaced" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="{{ url_for('home') }}">
<img src="{{ url_for('static', filename='images/logo-m.png') }}" alt="logo">
<span class="has-text-grey-dark"> by Artemis™</span>
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbarBasic" class="navbar-menu">
<div class="navbar-end">
<a class="navbar-item has-text-grey" href="{{ url_for('home') }}">Home</a>
<div class="navbar-item">
<a class="button is-primary is-rounded" href="{{ url_for('auth.login') }}">
<strong>Login</strong>
</a>
</div>
</div>
</div>
</nav>
</div>
</div>
</div>
</div>
<!-- Hero content: will be in the middle -->
<div class="hero-body is-align-items-stretch">
<div class="container is-flex">
<div class="columns is-centered is-flex-grow-1">
<div class="column is-narrow">
<aside class="menu">
<p class="menu-label">Servizi Arc</p>
<ul class="menu-list">
<li>
<i class="fas fa-project-diagram"></i> Actions™
<ul style="{{ 'display: block;' if 'actions' in request.path else 'display: none;' }}">
<li><a>Members</a></li>
<li><a>Plugins</a></li>
<li><a>Add a member</a></li>
</ul>
</li>
<a><i class="fas fa-shield-alt"></i> Security™ <span class="tag is-primary is-rounded">In arrivo</span></a>
</ul>
</aside>
</div>
<div class="column is-7 is-align-self-center">
<div class="box">
<h1 class="title has-text-weight-light">
Hello, <span class="has-text-weight-bold">username</span>.
</h1>
<p class="subtitle is-5 has-text-grey">Seleziona un servizio per continuare...</p>
</div>
</div>
</div>
</div>
</div>
<!-- Hero footer: will stick at the bottom -->
<div class="hero-foot">
<footer style="border-top: 1px solid hsl(0, 0%, 93%); padding-top: 1.7rem;">
<div class="container">
<div class="columns is-vcentered is-centered has-text-centered-mobile">
<div class="column is-narrow">
<img src="{{ url_for('static', filename='images/logo-s.png') }}" alt="logo">
</div>
<div class="column is-3">
<h5 class="title is-5 has-text-grey-light has-text-weight-normal is-italic">
Arc ha come obiettivo il creare un'ecosistema semplice ma potente per aiutarti a gestire tutte le tue operazioni.
</h5>
</div>
<div class="column is-4 is-narrow">
© 2020 RGBCraft & Artemis™.
<br>
<i>Tutti i diritti riservati.</i>
</div>
<div class="column is-narrow">
Sitemap
<ul>
<li><a class="has-text-grey" href="{{ url_for('home') }}">Home</a></li>
<li><a class="has-text-grey" href="{{ url_for('auth.login') }}">Login</a></li>
</ul>
</div>
</div>
</div>
</footer>
</div>
</section>

Basically what you are trying to achieve , pushing contents from bottom to top is by not displaying the top content
rather than setting the visibility of top portion to invisible
Try this out ,( in your class="hero-head")
<div class="hero-head display is-hidden-mobile">
Please refer this documentation for more clarification

Related

elements in a foreach loop getting different css/bootstrap styles in laravel

am getting this weird bug whereby css styles are only applying to the first 2 items in my foreach loop.here is my code.
//html code
<div class="row">
#if ($housescategory->isEmpty())
<div class="col-lg-4">
No houses Found At the Moment
</div>
#else
#foreach ($housescategory as $rentalhse)
<div class="col-lg-4">
<section class="card hsecard">
<figure>
<div class="img-overlay hot-home">
#if($rentalhse->vacancy_status==1)
<span class="badge badge-info p-2 rounded-0 statusbadge">Vacants Available</span>
#elseif($rentalhse->vacancy_status==2)
<span class="badge badge-success p-2 rounded-0 statusbadge">Fully Booked</span>
#endif
<img src="{{ asset ('imagesforthewebsite/rentalhouses/rentalimages/medium/'.$rentalhse->rental_image) }}" alt="{{ $rentalhse->rental_name }}">
</div>
{{ $rentalhse->id }}<figcaption>{{ $rentalhse->rental_name }}
</figcaption>
<div class="pricelocation" style="display: flex;
justify-content: space-between;">
<section class="location">
<a class="disabled font-italic h6"><i class="fa fa-map-marker"></i>{{ $rentalhse->houselocation->location_title }}</a>
</section>
<section class="pricelink">
<span class="btn btn-dark">sh.{{ $rentalhse->monthly_rent }}</span>
</section>
</div>
</figure>
<div class="card-content">
<p>{!! Str::limit($rentalhse->rental_details, 80)!!}</p>
<section class="icons-home">
<div class="name-icon">
#if ($rentalhse->cctv_cameras == 'yes')
<span>CCtv Security Cameras</span>
<div class="icon">
<i class="fa fa-camera-retro"></i>
<span>Available</span>
</div>
#endif
</div>
<div class="name-icon">
#if ($rentalhse->parking == 'yes')
<span>Parking</span>
<div class="icon">
<i class='fas fa-parking'></i>
<span>Available</span>
</div>
#endif
</div>
<div class="name-icon">
#if ($rentalhse->generator == 'yes')
<span>Backup Generator</span>
<div class="icon">
<i class="fa fa-bolt"></i>
<span>Available</span>
</div>
#endif
</div>
</section>
</div>
<div class="viewprice" style="display: flex;
justify-content: space-between; margin:0px !important;">
<section class="viewlink">
Contact Admin
</section>
<section class="viewlink">
<a class="btn-sm btn-warning" href="{{ url('rentalhse/'.$rentalhse->rental_slug.'/'.$rentalhse->id) }}" role="button" >
View Details
</a>
</section>
</div>
</section>
</div>
#endforeach
#endif
here its how it looks like in the page .here the paragraph starts getting itaicised which is a different style from the first one.. here is the other part here the column gets smaller different from the set one in the row.its been giving me headache i havent understood why its coming up.

django admin popups properties arent shown

When I want to change plugin in admin site or edit existing one (no matter which one I open). Properties in popup aren't shown or if they are, they aren't on right positions.
When pop up shows to edit plugin I can't click save. I must scroll out page (ctr and -) to see save button. It's not only save button, most of properties aren't shown properly.
if I add any more placeholders, I am not able to see save button, even with zooming out. The problems only appears in django admin site, where I want to add plugins.
Without bootstrap template I can't place a lot of placeholders without affect djangoadmin popups.
How can I fix this?
base.html :
{% load cms_tags sekizai_tags %}
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<title>{% page_attribute "page_title" %}</title>
{% render_block "css" %}
</head>
<body>
{% cms_toolbar %}
{% block base_content %}{% endblock %}
{% render_block "js" %}
<footer>
{% static_placeholder 'footer' %}
</footer>
</body>
</html>
template_two.html :
{% extends "base.html" %}
{% load cms_tags %}
<html>
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
{% block base_content %}
<body id="myPage" data-spy="scroll" data-target=".navbar" data-offset="60">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#myPage">Logo</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li>ABOUT</li>
<li>SERVICES</li>
<li>PORTFOLIO</li>
<li>PRICING</li>
<li>CONTACT</li>
{% if user.is_authenticated %}<li>Messages</li>
{% else %}aa{% endif %}
<ul class="nav navbar-nav navbar-right">
<li><span class="glyphicon glyphicon-user"></span> {% if user.is_authenticated %}<li><a href="/logout">Log Out
<li>{{request.user.username}}</li>
</li>
{% else %}
<li>Log In</li>
{% endif %}</a></li>
</ul>
</ul>
</div>
</div>
</nav>
{% placeholder aa %}
<div class="jumbotron text-center">
<h1>Company</h1>
<p>We specialize in blablabla</p>
<form class="form-inline">
<input type="email" class="form-control" size="50" placeholder="Email Address" required>
<button type="button" class="btn btn-danger">Subscribe</button>
</form>
</div>
<!-- Container (About Section) -->
<div id="about" class="container-fluid">
<div class="row">
<div class="col-sm-8">
<h2>About Company Page</h2><br>
<br><button class="btn btn-default btn-lg">Get in Touch</button>
</div>
<div class="col-sm-4">
<span class="glyphicon glyphicon-signal logo"></span>
</div>
</div>
</div>
<div class="container-fluid bg-grey">
<div class="row">
<div class="col-sm-4">
<span class="glyphicon glyphicon-globe logo slideanim"></span>
</div>
<div class="col-sm-8">
<h2>Our Values</h2><br>
<h4><strong>MISSION:</strong> {% placeholder mission %}</p>
</div>
</div>
</div>
<!-- Container (Services Section) -->
<div id="services" class="container-fluid text-center">
<h2>SERVICES</h2>
<h4>What we offer</h4>
<br>
<div class="row slideanim">
<div class="col-sm-4">
<span class="glyphicon glyphicon-off logo-small"></span>
<h4>POWER</h4>
<p>Lorem ipsum dolor sit amet..</p>
</div>
<div class="col-sm-4">
<span class="glyphicon glyphicon-heart logo-small"></span>
<h4>LOVE</h4>
<p>Lorem ipsum dolor sit amet..</p>
</div>
<div class="col-sm-4">
<span class="glyphicon glyphicon-lock logo-small"></span>
<h4>JOB DONE</h4>
<p>Lorem ipsum dolor sit amet..</p>
</div>
</div>
<br><br>
<div class="row slideanim">
<div class="col-sm-4">
<span class="glyphicon glyphicon-leaf logo-small"></span>
<h4>GREEN</h4>
<p>Lorem ipsum dolor sit amet..</p>
</div>
<div class="col-sm-4">
<span class="glyphicon glyphicon-certificate logo-small"></span>
<h4>CERTIFIED</h4>
<p>Lorem ipsum dolor sit amet..</p>
</div>
<div class="col-sm-4">
<span class="glyphicon glyphicon-wrench logo-small"></span>
<h4 style="color:#303030;">HARD WORK</h4>
<p>Lorem ipsum dolor sit amet..</p>
</div>
</div>
</div>
<!-- Container (Portfolio Section) -->
<div id="portfolio" class="container-fluid text-center bg-grey">
<h2>Portfolio</h2><br>
<h4>What we have created</h4>
<div class="row text-center slideanim">
<div class="col-sm-4">
<div class="thumbnail">
<img src="paris.jpg" alt="Paris" width="400" height="300">
<p><strong>Paris</strong></p>
<p>Yes, we built Paris</p>
</div>
</div>
<div class="col-sm-4">
<div class="thumbnail">
<img src="newyork.jpg" alt="New York" width="400" height="300">
<p><strong>New York</strong></p>
<p>We built New York</p>
</div>
</div>
<div class="col-sm-4">
<div class="thumbnail">
<img src="sanfran.jpg" alt="San Francisco" width="400" height="300">
<p><strong>San Francisco</strong></p>
<p>Yes, San Fran is ours</p>
</div>
</div>
</div><br>
<h2>What our customers say</h2>
<div id="myCarousel" class="carousel slide text-center" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<h4>"This company is the best. I am so happy with the result!"<br><span style="font-style:normal;">Michael Roe, Vice President, Comment Box</span></h4>
</div>
<div class="item">
<h4>"One word... WOW!!"<br><span style="font-style:normal;">John Doe, Salesman, Rep Inc</span></h4>
</div>
<div class="item">
<h4>"Could I... BE any more happy with this company?"<br><span style="font-style:normal;">Chandler Bing, Actor, FriendsAlot</span></h4>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<!-- Container (Pricing Section) -->
<div id="pricing" class="container-fluid">
<div class="text-center">
<h2>Pricing</h2>
<h4>Choose a payment plan that works for you</h4>
</div>
<div class="row slideanim">
<div class="col-sm-4 col-xs-12">
<div class="panel panel-default text-center">
<div class="panel-heading">
<h1>Basic</h1>
</div>
<div class="panel-body">
<p><strong>20</strong> Lorem</p>
<p><strong>15</strong> Ipsum</p>
<p><strong>5</strong> Dolor</p>
<p><strong>2</strong> Sit</p>
<p><strong>Endless</strong> Amet</p>
</div>
<div class="panel-footer">
<h3>$19</h3>
<h4>per month</h4>
<button class="btn btn-lg">Sign Up</button>
</div>
</div>
</div>
<div class="col-sm-4 col-xs-12">
<div class="panel panel-default text-center">
<div class="panel-heading">
<h1>Pro</h1>
</div>
<div class="panel-body">
<p><strong>50</strong> Lorem</p>
<p><strong>25</strong> Ipsum</p>
<p><strong>10</strong> Dolor</p>
<p><strong>5</strong> Sit</p>
<p><strong>Endless</strong> Amet</p>
</div>
<div class="panel-footer">
<h3>$29</h3>
<h4>per month</h4>
<button class="btn btn-lg">Sign Up</button>
</div>
</div>
</div>
<div class="col-sm-4 col-xs-12">
<div class="panel panel-default text-center">
<div class="panel-heading">
<h1>Premium</h1>
</div>
<div class="panel-body">
<p><strong>100</strong> Lorem</p>
<p><strong>50</strong> Ipsum</p>
<p><strong>25</strong> Dolor</p>
<p><strong>10</strong> Sit</p>
<p><strong>Endless</strong> Amet</p>
</div>
<div class="panel-footer">
<h3>$49</h3>
<h4>per month</h4>
<button class="btn btn-lg">Sign Up</button>
</div>
</div>
</div>
</div>
</div>
<!-- Container (Contact Section) -->
<div id="contact" class="container-fluid bg-grey">
<h2 class="text-center">CONTACT</h2>
<div class="row">
<div class="col-sm-5">
<p>Contact us and we'll get back to you within 24 hours.</p>
<p><span class="glyphicon glyphicon-map-marker"></span> Chicago, US</p>
<p><span class="glyphicon glyphicon-phone"></span> +00 1515151515</p>
<p><span class="glyphicon glyphicon-envelope"></span> myemail#something.com</p>
</div>
<div class="col-sm-7 slideanim">
<div class="row">
<div class="col-sm-6 form-group">
<input class="form-control" id="name" name="name" placeholder="Name" type="text" required>
</div>
<div class="col-sm-6 form-group">
<input class="form-control" id="email" name="email" placeholder="Email" type="email" required>
</div>
</div>
<textarea class="form-control" id="comments" name="comments" placeholder="Comment" rows="5"></textarea><br>
<div class="row">
<div class="col-sm-12 form-group">
<button class="btn btn-default pull-right" type="submit">Send</button>
</div>
</div>
</div>
</div>
</div>
<div id="googleMap" style="height:400px;width:100%;"></div>
<!-- Add Google Maps -->
<script src="https://maps.googleapis.com/maps/api/js"></script>
<script>
var myCenter = new google.maps.LatLng(41.878114, -87.629798);
function initialize() {
var mapProp = {
center:myCenter,
zoom:12,
scrollwheel:false,
draggable:false,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("googleMap"),mapProp);
var marker = new google.maps.Marker({
position:myCenter,
});
marker.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
<footer class="container-fluid text-center">
<a href="#myPage" title="To Top">
<span class="glyphicon glyphicon-chevron-up"></span>
</a>
<p>Bootstrap Theme Made By www.w3schools.com</p>
</footer>
<script>
$(document).ready(function(){
// Add smooth scrolling to all links in navbar + footer link
$(".navbar a, footer a[href='#myPage']").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (900) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 900, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
$(window).scroll(function() {
$(".slideanim").each(function(){
var pos = $(this).offset().top;
var winTop = $(window).scrollTop();
if (pos < winTop + 600) {
$(this).addClass("slide");
}
});
});
})
</script>
</body>
{% endblock
%}
</html>
I would recommend using the developer console to see if any files are missing during the plugin load. There you should be able to see if any static files are missing.
Also, please make sure that your static files are configured properly - i.e. that you have ran manage.py collectstatic and the static URL points to the right location.

Foreach loop for image slide show does not work

I am trying to parse some data and images from controller to show on view. I implemented a foreach loop to show some images in slideshow. But whenever I run the code only the first image appears inside the body, and other images and information goes below the footer. I am not getting what mistake I made in this code.
My code is-
<div class="row wrapper border-bottom white-bg page-heading">
<div class="col-lg-10">
<h2>#ViewBag.Title</h2>
<ol class="breadcrumb">
<li class="active">
Back
</li>
</ol>
</div>
</div>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Search</title>
</head>
<body>
<div>
#foreach (var item in ViewBag.Cities) {
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>#item.Name</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
</div>
</div>
<div class="ibox-content">
<p>#item.Shorttext</p>
</div>
</div>
</div>
foreach (var image in item.Images) {
<div class="col-lg-5">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>Animation without caption</h5>
</div>
<div class="ibox-content">
<div class="carousel slide" id="carousel1">
<div class="carousel-inner">
<div class="item active">
<img alt="image" class="img-responsive" src="#image" style="height:400px;width:600px">
</div>
</div>
<a data-slide="prev" href="#carousel1" class="left carousel-control">
<span class="icon-prev"></span>
</a>
<a data-slide="next" href="#carousel1" class="right carousel-control">
<span class="icon-next"></span>
</a>
</div>
</div>
</div>
</div>
} }
</div>
</body>
</html>
My view is looking like this.
Hope it will solve your issue.
<div class="col-lg-10">
<h2>#ViewBag.Title</h2>
<ol class="breadcrumb">
<li class="active">
Back
</li>
</ol>
</div>
</div>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Search</title>
</head>
<body>
<div>
#foreach (var item in ViewBag.Cities) {
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>#item.Name</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
</div>
</div>
<div class="ibox-content">
<p>#item.Shorttext</p>
</div>
</div>
</div>
}
foreach (var image in item.Images) {
<div class="col-lg-5">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>Animation without caption</h5>
</div>
<div class="ibox-content">
<div class="carousel slide" id="carousel1">
<div class="carousel-inner">
<div class="item active">
<img alt="image" class="img-responsive" src="#image" style="height:400px;width:600px">
</div>
</div>
<a data-slide="prev" href="#carousel1" class="left carousel-control">
<span class="icon-prev"></span>
</a>
<a data-slide="next" href="#carousel1" class="right carousel-control">
<span class="icon-next"></span>
</a>
</div>
</div>
</div>
</div>
}
</div>
</body>
</html>

Div pushes down other div, CSS

I want to add simple sidebar to existing layout (content).
So far I have like this.
HTML
<div class="container">
<div class="side-menui">
</div>
....
</div>
Full HTML
<div class="container">
<div class="side-menui">
</div>
<div class="banner-navigation-containet clearfix">
<div class="navigation-container pull-left">
<nav class="navbar" role="navigation">
<div class="container-fluid clearfix">
<div class="navbar-header pull-left">
<a class="navbar-brand" href="http://www.lo.eu/lv">
<img alt="logo" class="img-responsive" src="./Ind_files/logo.png" title="logo">
</a>
</div>
<div class="selections">
<div class="pull-left">
<a aria-expanded="true" data-toggle="dropdown" href="http://www.lo.eu/lv?country_id=1#">LATVIJA</a>
<ul class="dropdown-menu">
IGAUNIJA
</ul>
</div>
<div class="pull-right">
<a aria-expanded="true" data-toggle="dropdown" href="http://www.lo.eu/lv?country_id=1#" id="dropdownMenu2">LV</a>
<ul class="dropdown-menu">
<li>RU</li>
</ul>
</div>
</div><!-- End language-container -->
</div><!-- /.container-fluid -->
</nav><!-- End navbar-->
</div><!--End navigation-container-->
<div class="banner-2 pull-left">
<img alt="Selection 011" class="img-responsive" height="90" id="banner" src="./Ind_files/Selection_011.jpg" width="500">
</div>
<div class="banner-3 pull-left" ;="">
<img alt="Selection 011" class="img-responsive" height="90" id="banner2" src="./Ind_files/Selection_011(1).jpg" width="500">
</div>
</div><!-- End banner-navigation-containet -->
<!--<div id="bag-icon" class="flip2"> <img alt="Bag icon" src="/assets/bag-icon.png" /></div>
<div id="nav-toggle-lines" class="flip"></div> -->
<div class="row block-list">
<div class="col-lg-4 col-md-3 col-sm-2 col-xs-1 block clearfix" id="advertisement-col" style="display:none; border:none;">
</div><!-- End block-->
<div class="col-lg-4 col-md-3 col-sm-2 col-xs-1 block clearfix">
<div class="block-main-info clearfix">
<div class="pull-left block-main-title">dasdad</div>
<div class="pull-left block-main-location">Buļļi</div>
<div class="pull-left block-main-id">ID </div>
</div><!-- End block-main-info -->
<div class="pull-left block-image">
<a class="" href="http://www.lo.eu/lv?country_id=1#" onclick="loginModalShow();" require_login="true"><img alt="dasdad" src="./Ind_files/block-2-image(1).jpg" title="dasdad"></a>
</div><!-- End block-image -->
<div class="pull-left block-info">
<table>
<tbody><tr class="block-age">
<td class="block-info-image"></td>
<td class="block-info-number">22</td>
<td class="block-info-text">teksts</td>
</tr>
<tr class="block-length">
<td class="block-info-image"></td>
<td class="block-info-number">148</td>
<td class="block-info-text">teksts</td>
</tr>
<tr class="block-weight">
<td class="block-info-image"></td>
<td class="block-info-number">43</td>
<td class="block-info-text">teksts</td>
</tr>
<tr class="block-bust">
<td class="block-info-image"></td>
<td class="block-info-number">1</td>
<td class="block-info-text">teksts</td>
</tr>
</tbody></table>
<div class="block-bottom-info">
<div class="block-info-tel-number"><span>+371</span> 26262626</div>
<div class="clearfix">
<div class="pull-left">stunda:</div>
<div class="pull-right"><b>60</b>EUR</div>
</div>
</div><!-- End block-info -->
</div><!-- End block-info -->
</div><!-- End block-->
</div><!-- End row-->
<div class="panel">
<form accept-charset="UTF-8" action="http://www.lo.eu/lv/girls" class="girl_search" data-remote="true" id="girl_search" method="get"><div style="display:none"><input name="utf8" type="hidden" value="✓"></div>
<div class="sort-links">
<div class="input-group">
<input class="form-control" id="q_name_or_phone_number_or_identifier_cont" name="q[name_or_phone_number_or_identifier_cont]" placeholder="Search..." type="text">
<div class="input-group-btn">
<button class="btn btn-default" type="submit"><img alt="Search icon" src="./Ind_files/search-icon.png" width="15"></button>
</div>
</div>
</div>
<div id="sorter">
<div id="left">
<select id="q_region_id_eq" name="q[region_id_eq]"><option value="">RAJONS</option>
</div>
<div id="center">
<a class="sort_link " data-method="get" data-remote="true" href="http://www.lo.eu/lv?country_id=1&q%5Bs%5D=height+asc">AUGUMS</a>
</div>
<div id="right">
<a class="sort_link " data-method="get" data-remote="true" href="http://www.lo.eu/lv?country_id=1&q%5Bs%5D=bust_size+asc">KRŪTIS</a>
</div>
</div>
<div id="sorter">
<div id="left">
<a class="sort_link " data-method="get" data-remote="true" href="http://www.lo.eu/lv?country_id=1&q%5Bs%5D=age+asc">VECUMS</a>
</div>
<div id="center">
<a class="sort_link " data-method="get" data-remote="true" href="http://www.lo.eu/lv?country_id=1&q%5Bs%5D=per_hour+asc">CENA</a>
</div>
<div id="right">
<a class="sort_link " data-method="get" data-remote="true" href="http://www.lo.eu/lv?country_id=1&q%5Bs%5D=votes_for.size+asc">REITINGS</a>
</div>
</div>
<div class="clickable">
MEITENES
<span>MEITENES</span>
</div>
<div class="clickable" id="blacklist-menu">
MELNAIS SARAKSTS
<span>MELNAIS SARAKSTS
<div class="pull-right">
<div id="icon-side"> >
<!--- <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> -->
</div>
<div id="icon-down" style="display:none;">
<!--<span class="glyphicon glyphicon-chevron-down" aria-hidden="true"></span> -->
</div>
</div>
</span>
</div>
<!-- Noslēptās izvēles -->
<div class="clickable" id="hiden" style="display:none;">
<a class="" href="http://www.lo.eu/lv?country_id=1#" onclick="loginModalShow();" require_login="true">Meitenes </a>
<span>MEITENES</span>
</div>
<div class="clickable" id="hiden2" style="display:none;">
<a class="" href="http://www.lo.eu/lv?country_id=1#" onclick="loginModalShow();" require_login="true">Klienti </a>
<span>KLIENTI</span>
</div>
<!-- Noslēptās izvēles BEIGAS-->
<div class="clickable" id="shown">
NOTEIKUMI
<span>NOTEIKUMI</span>
</div>
<div class="clickable" id="shown2">
IESNIEGT SLUDINĀJUMU
<span>IESNIEGT SLUDINĀJUMU</span>
</div>
</form>
</div>
<div class="panel2">
<div class="dr">
<div class="clickable2">
<a class="" href="http://www.lo.eu/lv?country_id=1#" onclick="loginModalShow();" require_login="true">IENĀKT</a>
<span>Ieiet</span>
</div>
<div class="clickable2">
ANKETA
<span>Anketa</span>
</div>
<div class="clickable2">
<a data-target="#usersignup" data-toggle="modal" href="http://www.lo.eu/lv?country_id=1#" id="asaa">REĢISTRĒTIES</a>
<span>Reģistrēties</span>
</div>
<div class="clickable2">
PALĪDZĪBA
<span>Palīdzība</span>
</div>
</div><!-- End block-->
</div>
</div><!-- End container -->
CSS
.container {
width: 1170px;
padding: 0;
}
div.side-menui {
position: relative;
left:-20px;
z-index: 5;
width:35px;
height:350px;
border:1px solid gray;
}
Problem: side-menui pushes down all content exactly his height.
What I need:
I googled for similar questions tried other positions like absolute, fixed .. but I got way worse results than I have already.
I am missing something very straightforward ?
you need to take the element out of flow so that it isnt going to effect anything else.
you can do this by either setting
float: left;
or
position: absolute; /* or fixed */

Replace body except footer

I use this to load a page and replace the current page:
$.get('genres.html').done(function (data) {
$('#pagecontent').html(data);
})
When i do this everything in de body gets replaced with the new content.
I need to replace the full body except this footer.
I did see something about div:not but i think thats not working with ajax.
How can i replace everything except the footer:
<footer class="footer bg-dark">
<div id="jp_container_N">
<div class="jp-type-playlist">
<div id="jplayer_N" class="jp-jplayer hide"></div>
<div class="jp-gui">
<div class="jp-video-play hide"><a class="jp-video-play-icon">play</a></div>
<div class="jp-interface">
<div class="jp-controls">
<div><a class="jp-previous"><i class="icon-control-rewind i-lg"></i></a>
</div>
<div><a class="jp-play"><i class="icon-control-play i-2x"></i></a>
<a class="jp-pause hid"><i class="icon-control-pause i-2x"></i></a>
</div>
<div><a class="jp-next"><i
class="icon-control-forward i-lg"></i></a></div>
<div class="hide"><a class="jp-stop"><i class="fa fa-stop"></i></a>
</div>
<div><a class="" data-toggle="dropdown" data-target="#playlist"><i
class="icon-list"></i></a></div>
<div class="jp-progress hidden-xs">
<div class="jp-seek-bar dk">
<div class="jp-play-bar bg-info"></div>
<div class="jp-title text-lt">
<ul>
<li></li>
</ul>
</div>
</div>
</div>
<div class="hidden-xs hidden-sm jp-current-time text-xs text-muted"></div>
<div class="hidden-xs hidden-sm jp-duration text-xs text-muted"></div>
<div class="hidden-xs hidden-sm"><a class="jp-mute" title="mute"><i
class="icon-volume-2"></i></a> <a class="jp-unmute hid"
title="unmute"><i
class="icon-volume-off"></i></a></div>
<div class="hidden-xs hidden-sm jp-volume">
<div class="jp-volume-bar dk">
<div class="jp-volume-bar-value lter"></div>
</div>
</div>
<div><a class="jp-shuffle" title="shuffle"><i
class="icon-shuffle text-muted"></i></a> <a
class="jp-shuffle-off hid" title="shuffle off"><i
class="icon-shuffle text-lt"></i></a></div>
<div><a class="jp-repeat" title="repeat"><i
class="icon-loop text-muted"></i></a> <a
class="jp-repeat-off hid" title="repeat off"><i
class="icon-loop text-lt"></i></a></div>
<div class="hide"><a class="jp-full-screen" title="full screen"><i
class="fa fa-expand"></i></a> <a class="jp-restore-screen"
title="restore screen"><i
class="fa fa-compress text-lt"></i></a></div>
</div>
</div>
</div>
<div class="jp-playlist dropup" id="playlist">
<ul class="dropdown-menu aside-xl dker">
<!-- The method Playlist.displayPlaylist() uses this unordered list -->
<li class="list-group-item"></li>
</ul>
</div>
<div class="jp-no-solution hide"><span>Update Required</span> To play the media
you will need to either update your browser to a recent version or update
your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash
plugin</a>.
</div>
</div>
</div>
</footer>
Just put everything outside the footer in a container, then replace the contents of that. Something like:
<div id="content">
...your content here
</div>
<footer>
</footer>
Then do:
$.get('genres.html').done(function (data) {
$('#content').html(data);
})