Properly align Css boxes - html

I have boxes that wouldnt align properly. Some of them are 40px higher than others, and have remove icon as you can see in the picture:
Not working
If all boxes are the same height then boxes would align properly:
working
Unfortunately i cannot make them all the same height. I want to align them properly, without changing height. I know that there will be some margin differences because of diferent height but that is okay.
Here is code for the boxes:
.parents-parent {
margin: auto;
width: 800px;
}
.parent {
float: left;
width: 200px;
background-color: white;
border: 1px solid rgb(230,230,230);
margin: 10px;
min-height: 150px;
}
.exam-box-el {
background-color: white;
height: 40px;
line-height: 40px;
width: 100%;
}
.exam-box-el:hover {
background-color: rgb(247,247,247);
cursor: pointer;
}
.parent a {
color: rgb(85, 85, 85);
}
.parent a:hover {
text-decoration: none;
color: rgb(85, 85, 85);
}
.parent .glyphicon {
margin: 0 5px 0 10px;
}
.more {
border-top: 1px solid rgb(210,210,210);
}
.exam-title {
text-align: center;
background-color: ;
height: 40px;
line-height: 40px;
width: 100%;
}
.exam-title a {
color: rgb(51, 122, 183);
}
.exam-title a:hover {
text-decoration: none;
color: rgb(51, 122, 183);
}
and html:
<div class="parents-parent">
{% for exam in exams %}
<div class="parent" exam-id="{{ exam.pk }}" csrf="{{ csrf_token }}">
<div class="exam-title">
<a><b>Test številka {{ exam.exam_number }}</b></a>
</div>
<a class="exam-span-wrapper">
<div class="exam-box-el exam-span-file">
<span class="glyphicon glyphicon-file"></span> Test
</div>
<ul class="exam-ul">
{% for file in exam.examfile_set.all %}
<li class="exam-li-img" src="{{ file.exam_file.url }}" alt="Slika Testa" width="60" height="60" class="img-resposive exam-img">Slika Testa {{ forloop.counter }}</li>
{% endfor %}
</ul>
</a>
<a class="comment">
<div class="exam-box-el">
<span class="glyphicon glyphicon-comment"></span> Komentarji
</div>
</a>
<a class="mark-exam">
<div class="exam-box-el">
<span data-toggle="tooltip" data-placement="bottom" title="Potrebno popravka" class="glyphicon glyphicon-ban-circle {% if user in exam.exam_mark.all %}active{% endif %}"></span> Potrebno popravka
</div>
</a>
<a href="{% url 'profile' exam.exam_user %}">
<div class="exam-box-el"><span class="glyphicon glyphicon-user"></span>{{ exam.exam_user }}
</div>
</a>
{% if exam.exam_user == user %}
<a href="#" class="remove-exam">
<div class="exam-box-el more">
<span class="glyphicon glyphicon-remove glyphicon-remove-exam" data-toggle="tooltip" data-placement="bottom" title="Izbriši"></span>
Odstrani
</div>
</a>
{% endif %}
</div>
{% endfor %}
</div>

Add .parents-parent { display: flex; flex-wrap: wrap; } and remove the float from .parent. That will create flex rows and each item will stretch to match the height of the parent.
Or if you're always going to have 3 cells per row, you can use :nth-child() on the floated cells to clear the left floats on every 3rd element. You would do that by adding .parent:nth-child(3n + 1) { clear: left; }

Related

Display Messages notifications inside a div box

When the user enter a not valid credentials it print this notificaitons message:
Sorry, your password was incorrect.<br/> Please double-check your password
But this doesn't look good when it is printed:
I want it to be printed between the Login button and the Forgot password.
Like that:
So theoretically the white box should expend to the bootom to leave so place for the notifications message
html file
<div class="testlol2" >
<div class="login-box" align="center">
<img class="logo" src="{% static 'images/testlogo.png' %}" alt="">
<div class="testlol" align="center">
<form action="" method="post">
{% csrf_token %}
{{ form|crispy }}
<div class="my-button">
<input class="login-button" type="submit" value="Log in">
</div>
</form>
{% if messages %}
<ul class="messages">
{% for message in messages %}
<p{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</p>
{% endfor %}
</ul>
{% endif %}
<a class="forgot" href="">Forgot password?</a>
</div>
</div>
</div>
css file
body{
background-color: #fafafa !important;
}
.messages {
position: relative;
top: 10px;
right: 8px;
color: red;
}
.logo {
position: relative;
top: 28px;
left: 134px;
width: 200px;
}
.testlol {
position: relative;
top: 115px;
right: 90px;
}
.testlol2 {
display:flex;
justify-content: center;
}
.login-box {
display:flex;
justify-content: center;
align-items: start;
align-self: center;
position: relative;
top: 100px;
background: #fff;
border: 1px solid #e6e6e6;
border-radius: 1px;
margin:0 0 10px;
padding: 10px 0;
height: 280px;
width: 325px;
}
.forgot {
position: absolute;
top: 128px;
right: 95px;
font-size: 12px;
margin-top: 12px;
text-align: center;
color: #000000;
line-height: 14px!important;
text-decoration: none;
}
Your code (css) is quite a mess. I tried making some minimal changes to it would partly look ok. Main fix was to make the .messages have margin of 115px from top rather than be positioned 115px from top, so that login-box would expand in height.
body {
background-color: #fafafa !important;
}
.messages {
position: relative;
top: 10px;
right: 8px;
color: red;
}
.logo {
position: relative;
top: 28px;
left: 134px;
width: 200px;
}
.testlol {
position:relative;
right: 90px;
margin-top: 115px;
}
.testlol2 {
display: flex;
justify-content: center;
}
.login-box {
display: flex;
justify-content: center;
align-items: start;
align-self: center;
position: relative;
top: 100px;
background: #fff;
border: 1px solid #e6e6e6;
border-radius: 1px;
margin: 0 0 10px;
padding: 10px 0;
/* height: 280px; */
width: 325px;
}
.forgot {
/* position: absolute; */
top: 128px;
right: 95px;
font-size: 12px;
margin-top: 12px;
text-align: center;
color: #000000;
line-height: 14px!important;
text-decoration: none;
}
<div class="testlol2">
<div class="login-box" align="center">
<img class="logo" src="{% static 'images/testlogo.png' %}" alt="">
<div class="testlol" align="center">
<form action="" method="post">
{% csrf_token %} {{ form|crispy }}
<div class="my-button">
<input class="login-button" type="submit" value="Log in">
</div>
</form>
{% if messages %}
<ul class="messages">
{% for message in messages %}
<p{% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</p>
{% endfor %}
</ul>
{% endif %}
<a class="forgot" href="">Forgot password?</a>
</div>
</div>
</div>

The logo of my website is wider than the body

The top part of my website (with the logo and navbar) is slightly wider than the body (which is made up of 2 css columns).
How do I make the top and body both the same size?
Also, I recently had the opposite problem, with the body being wider, but by making the body regular, it left the top too wide.
My base html:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-175481126-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-175481126-1');
</script>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
font-family: Tahoma, Geneva, sans-serif;
background-color: #333;
}
li {
float: left;
border-right: 1px solid #bbb;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
/* Change the link color to #111 (black) on hover */
li a:hover {
background-color: #111;
color: white;
text-decoration:none;
}
/* for buttons*/
.paging {
background-color: #333;
border: none;
color: white;
padding: 8px 14px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
font-family: Tahoma, Geneva, sans-serif;
}
button:hover {
background-color: #111;
}
.register {
float: right;
}
.paging {
background-color: #333;
border: none;
color: white;
padding: 8px 14px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
font-family: Tahoma, Geneva, sans-serif;
}
button:hover {
background-color: #111;
}
/* title */
.title {
color: black;
padding: 10px;
text-align: center;
font-size: 40px;
font-family: Tahoma, Geneva, sans-serif;
Color: black;
text-decoration: none;
}
/* descriptions */
.description {
color: black;
padding: 15px;
font-family: Tahoma, Geneva, sans-serif;
text-align: left;
font-size: 13px;
}
/* embedd url */
.iframe-container{
position: relative;
width: 100%;
padding-bottom: 56.25%;
height: 0;
margin-left: auto; /* Automatic margin from left */
margin-right: auto; /* Automatic margin from right */
}
.iframe-container iframe{
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100%;
}
/* make columns */
* {
box-sizing: border-box;
}
.row {
display: flex;
flex-direction: row;
flex-wrap: wrap;
flex: 0 0 100%;
max-width: 100%;
/* you can just remove these margins all together. Just wanted to emphasize that there should be no margin left or right, to avoid overflow */
margin-left: 0px;
margin-right: 0px;
}
.videos, .ads {
flex-grow: 0; flex-shrink: 0;
}
.ads {
display: block;
float: right;
background-color: #c1c4c9;
width: 25%;
}
.videos {
display: block;
float: left;
width: 75%;
padding-right: 10%;
padding-left: 10%;
}
.image {
padding-right: 5%;
padding-left: 5%;
padding-top: 5%;
padding-bottom: 5%;
}
.logo {
flex-direction:; row;
flex:; 0 0 100%;
max-width 100%;
justify-content:; center;
}
.banner {
/* float: left;*/
width: 100%;
height: 5%;
background-color: red;
color: white;
text-align: center;
}
img {
max-width: 100%;
max-height: 100%;
}
/* header */
.header {
background-color: #F1F1F1;
text-align: center;
padding: 20px;
font-family: Tahoma, Geneva, sans-serif;
}
</style>
<html>
{% load static %}
<link rel="shortcut icon" type="image/png" href="{% static 'images/favicon.ico' %}"/>
<div class="logo">
<div class="header">
<a href="/">
<img src="https://i.ibb.co/5Rqps7F/logo-black.png" alt="Computer Man">
</a>
</div>
<ul>
<li class="all">All videos</li>
<li class="stam">Stam videos</li>
<li class="music">Music videos</li>
<li class="news">News videos</li>
<li class="contact">Contact</li>
<li class="register">Login/Register</li>
</ul>
<div class="banner">
<text align="center">We are still developing our site, so we may not be able to update videos as often as we want</text>
</div>
</div>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
The page html:
{% include 'base.html' %}
<style>
.{{ category }} {
background-color: grey;
}
</style>
<div class="row">
<div class="videos">
{% autoescape off %}
<h1 class="title"> {{ video_.title }} </h1>
{% ifnotequal video_.tag 'none' %}
<small align = left> {{ video_.tag }} </small>
{% endifnotequal %}
<div class="iframe-container"><p align="center"> {{ video_.url }}</p></div>
<div class="description"> {{ video_.description }} </div>
<hr/>
{% endautoescape %}
</div>
<div class="ads">
{% for ad in ad_item %}
{% ifequal ad.redirect 'False' %}
<img class="image" src="{{ ad.pic }}"></img>
{% endifequal %}
{% ifnotequal ad.redirect 'False' %}
<img class="image" src="{{ ad.pic }}"></img>
{% endifnotequal %}
{% endfor %}
</div>
</div>
Try adding margin: 0px. Since you are using Bootstrap you can just add class m-0 where you need it.
<div class="row m-0">
<div class="videos m-0">
{% autoescape off %}
<h1 class="title"> {{ video_.title }} </h1>
{% ifnotequal video_.tag 'none' %}
<small align = left> {{ video_.tag }} </small>
{% endifnotequal %}
<div class="iframe-container"><p align="center"> {{ video_.url }}</p></div>
<div class="description"> {{ video_.description }} </div>
<hr/>
{% endautoescape %}
</div>
<div class="ads m-0">
{% for ad in ad_item %}
{% ifequal ad.redirect 'False' %}
<img class="image" src="{{ ad.pic }}"></img>
{% endifequal %}
{% ifnotequal ad.redirect 'False' %}
<img class="image" src="{{ ad.pic }}"></img>
{% endifnotequal %}
{% endfor %}
</div>
</div>

Why aren't my nav links showing up now on my navbar?

My navbar had been working fine, until I tinkered with trying to change my navbar to fixed and now it's not working. Not sure what I did wrong, but none of my links are showing up at all. I removed the code I had originally put so it should be working now but it's not. I also tried doing the special reload, forgot what it's called, to get rid of an old cached file, but still not working. Only thing that shows up is my logo on my nav bar, that's it.
base.html/navbar
{% load bootstrap4 %}
{% load static %}
{% load unread_messages_counter %}
<!-- Navbar is located in this file -->
<!doctype html>
<html lang="en">
<head>
{% block head %}
<title>Base</title>
{% endblock %}
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/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.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://use.fontawesome.com/releases/v5.0.8/js/all.js"></script>
<link rel="stylesheet" href="{% static 'css/style.css' %}"/>
<link rel="stylesheet" href="{% static 'css/notification.css' %}" type="text/css" class = "notification"/>
<style>
<!-- Add this tag -->
{% block styles %}
{% endblock %}
</style>
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-custom navbar-expand-md">
<div class="container-fluid">
<a class= 'navbar-brand' href="{% url 'dating_app:home' %}"><img src="{% static 'images/cupids_corner_logo.jpg' %}"><h5 style="color:red"></h5> </a>
<button class= "navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarResponsive">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" >
<ul class ="navbar-nav ml-auto" >
{% if user.is_authenticated %}
{% unread_messages request.user as user_unread_messages %}
{% if user_unread_messages > 0 %}
<li class="nav-item" >
<a class= "notification" style="color:brown" href="{% url 'dating_app:conversations' user.id %}" type="text/css" >
<span>Inbox</span>
<span class="badge">{% unread_messages request.user %}</span>
</a>
</li>
{% else %}
<li class="nav-item">
<a style="color:brown" href="{% url 'dating_app:conversations' user.id %}">
<span>Inbox</span>
</a>
</li>
{% endif %}
<li class="nav-item">
<a style="color:brown" href="{% url 'dating_app:view_matches' user.id %}">Matches</a>
</li>
<li class="nav-item">
<a style="color:brown" href="{% url 'dating_app:mingle' %}">Mingle</a>
</li>
<li class="nav-item">
<a style="color:brown" href="{% url 'dating_app:profile' user.id %}">My Profile</a>
</li>
<li class="nav-item">
<a style="color:brown" href="{% url 'dating_app:logout' %}">log out</a>
</li>
{% else %}
<li class="nav-item">
<a style="color:brown" href="{% url 'dating_app:login' %}">login</a>
</li>
<li class="nav-item">
<a style="color:brown" href="{% url 'dating_app:register' %}">register</a>
</li>
{% endif %}
</ul>
</div>
</div>
</nav>
style.css
.navbar-nav li{
padding-left:35px;
padding-right:10px;
margin-top: -20px;
margin-bottom: -20px;
color:yellow;
width: 100%;
}
/* Modify the backgorund color */
.navbar-custom {
background-color: #ffffff;
border: 2px solid pink
}
.jumbotron{
background-image: url("/static/images/jumbo.jpg");
background-size: cover;
min-height: 350px
}
.notification {
text-decoration: none;
padding:50;
position: relative;
display: inline-block;
}
.notification .badge {
position: absolute;
top: -15px;
right: -10px;
padding: 5px 5px;
border-radius: 40%;
background-color: red;
color: white;
}
.social a{
font-size: 4.5em;
padding: 3rem;
}
.fa-facebook{
color: #3b5998;
}
.fa-twitter{
color:#00aced;
}
.fa-goggle-plus-g{
color:#dd4b39;
}
.fa-instagram{
color:#517fa4;
}
.fa-youtube{
color:#bb0000;
}
.fa-facebook:hover,
.fa-twitter:hover,
.fa-instagram:hover,
.fa-instagram:hover,
.fa-youtube:hover{
color: #d5d5d5;
}
footer {
padding-top:3.5rem;
color:blue;
background-color: #ffffff
}
hr.light{
border-top:1px solid red;
width:75%;
margin-top: .8rem;
margin-bottom:1rem;
}
hr.light-100{
border-top:1px solid #;
width:100%;
margin-top: .8rem;
margin-bottom:1rem;
}
body{
margin: 0px;
padding: 0px;
background-color: #FFFFFF;
font-family: arial;
box-sizing: border-box;
}
.card-container{
width: 300px;
height: 430px;
background: #FFF;
border-radius: 6px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
box-shadow: 0px 1px 10px 1px #000;
overflow: hidden;
display: inline-block;
}
.upper-container{
height: 150px;
background: #7F00FF;
}
.image-container{
background: white;
width: 80px;
height: 80px;
border-radius: 50%;
padding: 5px;
transform: translate(100px,100px);
}
.image-container img{
width: 80px;
height: 80px;
border-radius: 50%;
}
.lower-container{
height: 280px;
background: #FFF;
padding: 20px;
padding-top: 40px;
text-align: center;
}
.lower-container h3, h4{
box-sizing: border-box;
line-height: .6;
font-weight: lighter;
}
.lower-container h4{
color: #7F00FF;
opacity: .6;
font-weight: bold;
}
.lower-container p{
font-size: 16px;
color: gray;
margin-bottom: 30px;
}
.lower-container .btn{
padding: 12px 20px;
background: #7F00FF;
border: none;
color: white;
border-radius: 30px;
font-size: 12px;
text-decoration: none;
font-weight: bold;
transition: all .3s ease-in;
}
.lower-container .btn:hover{
background: transparent;
color: #7F00FF;
border: 2px solid #7F00FF;
}
Maybe instead of .navbar-nav li, try .navbar-nav li a in your css

<hr> below each three <div>s

I'm trying to put a <hr> below each three <div>s (one <hr> per three <div>s), however I'm getting unexpected results. I came to the conclusion that I have to put a <hr> below each third <div>, but when I do that, it is not positioned correctly (see the demo).
I am using this Django template:
{% extends 'pages/base.html' %}
{% load static %}
{% block cssfiles %}
<link rel="stylesheet" href="{% static 'products/css/list.css' %}" />
{% endblock %}
{% block jsfiles %}
<script type="text/javascript" src="{% static 'products/js/ellipsis.js' %}" defer></script>
{% endblock %}
{% block content %}
{% for product in products %}
<div class='product'>
<div class='product-title'>{{ product.title }} ({{ product.year }})</div>
<hr class='product-separator'>
{% if product.image %}
<div class='product-image'>
<img src='{{ product.image.url }}' width='100' height='100'>
</div>
{% endif %}
<p class='product-price'>${{ product.price }}</p>
</div>
{% if forloop.counter|add:1|divisibleby:3 %}
<hr>
{% endif %}
{% endfor %}
{% endblock %}
Here is the jsfiddle link.
Consider using CSS Grid and Flexbox for finer grained control. See the four CSS rules I added at the top of your code:
.grid{
display: grid;
grid-template-columns: 1fr 1fr 1fr;
}
.grid > hr{
grid-column: 1/4;
width: 100%;
}
.product {
display: flex;
flex-flow: column;
}
.product > .product-price{
margin-top: auto;
padding-top: 15px;
}
ul#menu {
position: relative;
}
ul {
list-style-type: none;
margin: 0;
padding :0;
}
li {
display: inline-block;
margin-right: 1px;
}
li a {
display:block;
min-width:103px;
height: 30px;
text-align: center;
line-height: 30px;
font-family: "Share Tech Mono";
color: #fff;
background: #2f3036;
text-decoration: none;
}
/*.product {
float: left;
width: 215px;
max-width: 215px;
height: 215px;
max-height: 215px;
}*/
.product-title {
color: #62646a;
margin-top: 10px;
margin-left: 10px;
margin-right: 10px;
font-weight: bold;
font-size: 13px;
line-height: 13px;
/*height: 26px;
overflow: hidden;*/
}
.product-description {
margin-left: 10px;
margin-right: 10px;
font-size: 12px;
text-align: justify;
text-justify: inter-word;
}
.product-separator {
height: 1px;
border-top: 1px;
border-left: 1px;
border-right: 1px;
margin-left: 10px;
margin-right: 10px;
color: #d9d7d7;
}
.product-image img {
display: block;
margin: auto;
margin-top: 20px;
}
.product-price {
color: #62646a;
margin-top: 15px;
margin-left: 10px;
font-size: 18px;
}
.product:hover {
background: #f5f3f2;
}
body {
margin: auto;
max-width: 800px;
}
<nav>
<ul id='menu'>
<li>Home</li>
<li>Shop</li>
<li>Contact</li>
<li>About</li>
</ul>
</nav>
<div class="grid">
<div class='product'>
<div class='product-title'>Franz Joseph (1917)</div>
<hr class='product-separator'>
<p class='product-price'>$100.00</p>
</div>
<div class='product'>
<div class='product-title'>Krugerrand South Africa (1917)</div>
<hr class='product-separator'>
<p class='product-price'>$200.00</p>
</div>
<div class='product'>
<div class='product-title'>Morgan Silver Dollar (1965)</div>
<hr class='product-separator'>
<div class='product-image'>
<img src='http://placekitten.com/200/200' width='100' height='100'>
</div>
<p class='product-price'>$50.00</p>
</div>
<hr>
<div class='product'>
<div class='product-title'>Peace Silver Dollar (1934)</div>
<hr class='product-separator'>
<div class='product-image'>
<img src='http://placekitten.com/200/200' width='100' height='100'>
</div>
<p class='product-price'>$75.00</p>
</div>
<div class='product'>
<div class='product-title'>Kralj Petar Drugi (1978)</div>
<hr class='product-separator'>
<div class='product-image'>
<img src='http://placekitten.com/200/200' width='100' height='100'>
</div>
<p class='product-price'>$1.00</p>
</div>
<div class='product'>
<div class='product-title'>Kralj Stefan Prvi Prvovencani Kotromanic (1389)</div>
<hr class='product-separator'>
<p class='product-price'>$1000.00</p>
</div>
</div>
it's the float that's breaking everything since you're telling the browser to display the products next to eachother.
try this:
</div>
{% if forloop.counter|add:1|divisibleby:3 %}
<hr style="clear:both;">

moving breadcrumb to right below the text and next to image, but won't just move

I'm having trouble moving breadcrumb to below my text.
I'm trying to move breadcrumb to right below the text. I did padding-left, float:left, but they won't just fit right. Any help would be appreciated.
Here is my code for breadcrumb:
<ol class="post-info">
<div class="btn-group btn-breadcrumb">
<span class="btn btn-default">{{ post.pub_date | date }}<i class="fa fa-clock-o"></i></span>
<span class="btn btn-default">{{post.views}}<i class="fa fa-eye"></i></span>
<span class="btn btn-default">{{ post.moderator.username }}<i class="fa fa-heart-o"></i></span>
discuss
{{post.category}}<i class="fa fa-hashtag"></i>
</div>
</ol>
And this is the css for my breadcrumb, but they can be changed. Can change size or anything that bothers from moving.
.btn-breadcrumb .btn:not(:last-child):after {
content: " ";
display: block;
width: 0;
height: 0;
border-top: 17px solid transparent;
border-bottom: 17px solid transparent;
border-left: 10px solid white;
position: absolute;
top: 50%;
margin-top: -17px;
left: 100%;
z-index: 3;
}
.btn-breadcrumb .btn.btn-default:not(:last-child):after {
border-left: 10px solid #fff;
}
.btn-breadcrumb .btn.btn-default:not(:last-child):before {
border-left: 10px solid #ccc;
}
.btn-breadcrumb .btn.btn-default:hover:not(:last-child):after {
border-left: 10px solid #ebebeb;
}
.btn-breadcrumb .btn.btn-default:hover:not(:last-child):before {
border-left: 10px solid #adadad;
}
Here is my html code, I'm trying to fit breadcrumb
<td class="vert-align">
{% if post.url %}
<h4 id="line">
<a href="{{ post.url }}" style="margin-left: 15px;">
<img src="{{post.image}}" height="85" width="85"/>
<span id="title-font">{{ post.title }}</span>
</a>
<span style="margin-left: 15px;" class="domain">
({{ post.domain }})
</span>
</h4>
{% else %}
<h4>
<a href="{% url 'post' post.slug %}" style="margin-left: 15px;">
{{ post.title }}
</a>
<span style="margin-left: 15px; "class="domain">
({{ post.domain }})
</span>
</h4>
{% endif %}
</td>
And below this code the breadcrumb code goes in. Then I get the picture like I posted on imgur.