Bootstrap columns are not stacking - css

In my classes .fam-col-right and .fam-col-left I am using display: table-cell; vertical-align: middle; float: none; in my css to vertically center the content I have as seen below. The .row is set to display: table;.
The problem I'm having is my columns aren't stacking at all and I'm not sure why. Here is what it looks like instead of it stacking.
How can I have my content stack and stay vertically aligned to the middle?
Here is my code:
<!-- Families -->
<div id="families">
<div class="container-fluid">
<div class="row text-center center-row">
<div class="col-md-6 col-md-push-6 fam-col-left">
<h2>Families & Individuals</h2>
<br>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus earum dolorum sapiente quod, voluptas optio, ducimus nemo rerum commodi porro laudantium nam. Veritatis ex enim culpa voluptatem, corporis? Distinctio, obcaecati.</p>
</div>
<div class="col-md-6 col-md-pull-6 fam-col-right">
<ul class="list-unstyled">
<li><i class="fa fa-map-o fa-fw fa-1x"></i> Wealth Management</li>
<li><i class="fa fa-pie-chart fa-fw fa-1x"></i> Asset Allocation</li>
<li><i class="fa fa-anchor fa-fw fa-1x"></i> Insurance Risk Assessments</li>
<li><i class="fa fa-graduation-cap fa-fw fa-1x"></i> Education Funds Planning</li>
<li><i class="fa fa-calendar-check-o fa-fw fa-1x"></i> Retirement Planning</li>
<li><i class="fa fa-area-chart fa-fw fa-1x"></i> Investments</li>
</ul>
</div>
</div> <!-- end row -->
</div> <!-- end container-fluid -->
</div> <!-- end families -->
.center-row {
display: table;
}
#families {
margin-bottom: -30px;
}
.fam-col-left {
background: url('../img/space.jpg');
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
height: 550px;
color: #FCFFF5; /*white*/
display: table-cell;
vertical-align: middle;
float: none;
}
.fam-col-left p {
width: 50%;
margin: 0 auto;
}
.fam-col-right {
display: table-cell;
vertical-align: middle;
float: none;
}
.fam-col-right li {
padding-bottom: 20px;
}

looking for something like this? - https://jsfiddle.net/9s1e9tm0/
.center-row {
display: table;
}
#families {
margin-bottom: -30px;
}
.fam-col-left {
background: url('http://www.unoosa.org/res/timeline/index_html/space-2.jpg');
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
height: 550px;
color: #FCFFF5; /*white*/
display: table-cell;
vertical-align: middle;
float: none;
width:50%;
}
.fam-col-left p {
width: 50%;
margin: 0 auto;
}
.fam-col-right {
display: table-cell;
vertical-align: middle;
float: none;
width:50%;
}
.fam-col-right li {
padding-bottom: 20px;
}

Related

pictures expand inside the class without being distorted

How do I make the pictures expand inside the class without being distorted and without edges or spaces between each other?
is there any other way to do this with Flexbox? there does not have to be a scrollbar and the .portof {class should not be too big in terms of height
How do I make the pictures expand inside the class without being distorted and without edges or spaces between each other?
is there any other way to do this with Flexbox? there does not have to be a scrollbar and the .portof {class should not be too big in terms of height
<pre>
<section class="Gallery">
<h1>Unsere Praxis</h1>
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Voluptatibus tempora accusantium provident ipsum placeat dolorem, dolores tempore optio, dignissimos eaque similique vel ea ullam nobis quas quae fugit laudantium sed!</p>
</section>
<!-- Portofolie -->
<section class="portof">
<div class="row">
<div class="wrapper">
<div class="container"> <img src="https://picsum.photos/350/250/?random=71" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=41" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=51" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=14" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=1" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=9" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=5" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=2" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=11" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=10" alt="?"></div>
</div>
<!-- <div class="gallery-row2">
sssdsd
</div>
--> </div>
</section>
</pre>
.Gallery{
width: 80%;
padding: 2% 0 0 0;
text-align: center;
margin: auto;
}
.Gallery h1{
font-size: 30px;
font-weight: 800;
color: #87CEEB;
}
.Gallery p{
padding-top: 10px;
font-family: 'Poppins', sans-serif;
font-weight: 30;
color: #000;
line-height: 30px;
font-size: 20px;
}
.portof{
width: 100%;
text-align: center;
background-color: royalblue;
background-image: url(img/slider_2.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
background-color: rgba(0, 0, 0, 0.8);
background-blend-mode: multiply;
clip-path: polygon(51% 19%, 100% 13%, 100% 85%, 51% 94%, 0 85%, 0 13%);
}
.wrapper {
padding: 2% 0 0 0;
font-size: 0;
display: block;
}
.container {
display: inline-block;
width: 20%;
}
img {
display: inline-block;
max-width: 100%;
}
.container:hover{
background-color: rosybrown;
}
Just update CSS class .wrapper display property to be flex and give the container zero padding as following
.wrapper {
padding: 2% 0 0 0;
font-size: 0;
display: flex;
}
.container {
display: inline-block;
width: 20%;
padding: 0;
}

How to put icons under an image and paragraph on the right?

I am using Bootstrap CSS. How can I make this styling using CSS:
I have used this content. this is the result i m getting
html
<div class="container">
<img class="post-thumb" src="https://image.ibb.co/gmbNQT/matthew.png" alt="matthew">
<ul>
<li>
<a href="https://github.com/ankul007" target="_blank">
<i class="fa fa-github-square" style="font-size:48px;color:purple"></i>
</a>
</li>
.
.
</ul>
<p class="post-content" >...........</p>
</div>
using this css
.post-thumb {
float: left;
border-radius: 50%;
display: inline-block;
height: 300px;
widows: 300px;
}
li {
list-style-type: none;
display: inline-block;
margin-right: 30px;
padding-top: 4px;
text-align: center;
}
.post-content {
margin-left: 350px;
text-align: justify;
}
Put both the icons and the image in a single parent and float them left:
.post-thumb {
float: left;
}
.post-thumb img {
border-radius: 50%;
display: inline-block;
height: 300px;
widows: 300px;
}
.post-thumb li {
list-style-type: none;
display: inline-block;
margin-right: 30px;
padding-top: 4px;
text-align: center;
font-size: 48px;
}
.post-content {
margin-left: 350px;
text-align: justify;
}
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="container">
<figure class="post-thumb">
<img src="https://image.ibb.co/gmbNQT/matthew.png" alt="matthew">
<ul>
<li>
<a href="https://github.com/ankul007" target="_blank">
<i class="fa fa-github-square"></i>
</a>
</li>
<li>
<a href="https://github.com/ankul007" target="_blank">
<i class="fa fa-facebook-square"></i>
</a>
</li>
<li>
<a href="https://github.com/ankul007" target="_blank">
<i class="fa fa-twitter-square"></i>
</a>
</li>
</ul>
</figure>
<p class="post-content">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iusto culpa eaque a laboriosam mollitia nulla tempora ab in autem doloremque praesentium, facilis, assumenda incidunt earum delectus. Sequi suscipit ad voluptates.</p>
</div>
Preview

Internet Explorer/Safari Flexbox(?) and Alignment Issues

I'm having some issues with item alignment in IE and Safari and I'm not that good on cross-browser compatibility so would appreciate it if someone could suggest what I'm doing wrong with the following or what may be a good general fix.
Codepen: http://codepen.io/nickwcook/pen/vxjavM?editors=0110.
EDIT: Home image alignment sorted, but still having issues with the following:
The text in the About section of the page is fine in other browsers, but in IE its not taking into account the horizontal padding (30px) of the parent, and is actually overflowing past the sides of the viewport.
HTML:
<body ng-app="portfolioApp" data-spy="scroll" data-target="#navbar">
<div id="borderTop"></div>
<div id="borderRight"></div>
<div id="borderBottom"></div>
<div id="borderLeft"></div>
<div id="logo">
<img src="img/logo-basic-dark.png" alt="Logo">
</div>
<div class="container-fluid">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="navbar">
<ul class="nav navbar-nav pull-right">
<li class="navLink">Home</li>
<li class="navLink">About</li>
<li class="navLink">Work</li>
<li class="navLink">Contact</li>
</ul>
</div>
</nav>
</div>
<main>
<section id="home">
<div class="sectionContent">
<div id="homeText">
<h1 id="homePrimary">Home Text Primary</h1>
<h2 id="homeSecondary">Home Text Secondary</h2>
</div>
<div id="homeImageContainer">
<div id="homeImage" class="blend-red-blue">
<div id="homeImageMask"></div>
</div>
</div>
</div>
</section>
<section id="about" ng-controller="skillsController">
<div class="sectionContent">
<div class="row">
<div class="col-xs-12 col-md-8 col-md-push-2">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<div id="skillsList">
<p>My skills include:</p>
<p ng-repeat="skill in skills" class="skillItem">{{skill.name}}</p>
</div>
</div>
</div>
</div>
</section>
<section id="work" ng-controller="projectsController">
<div class="sectionContent">
<div class="row">
<div class="project col-xs-12 col-md-6 col-lg-3">
<div>
<h2>Project One</h2>
<h4>Project Description</h4>
<a ng-href="#" target="blank_">View Project</a>
</div>
</div>
<div class="project col-xs-12 col-md-6 col-lg-3">
<div>
<h2>Project One</h2>
<h4>Project Description</h4>
<a ng-href="#" target="blank_">View Project</a>
</div>
</div>
<div class="project col-xs-12 col-md-6 col-lg-3">
<div>
<h2>Project One</h2>
<h4>Project Description</h4>
<a ng-href="#" target="blank_">View Project</a>
</div>
</div>
<div class="project col-xs-12 col-md-6 col-lg-3">
<div>
<h2>Project One</h2>
<h4>Project Description</h4>
<a ng-href="#" target="blank_">View Project</a>
</div>
</div>
</div>
</div>
</section>
<section id="contact">
<div class="sectionContent">
</div>
</section>
</main>
</body>
CSS:
/* GENERAL LAYOUT */
html, body
{
padding: 0;
margin: 0;
background-color: #fefefe;
overflow-x: hidden;
}
/* SECTIONS */
section
{
display: block;
margin: 0;
background: transparent;
z-index: 90;
}
.sectionContent
{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
padding: 100px 30px;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
}
/* HOME SECTION */
#home #homeImageContainer
{
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
#home #homeImage
{
position: absolute;
height: 30vw;
width: 30vw;
background-image: url('../img/laptop-hands.png');
background-position: center center;
background-size: cover;
z-index: 90;
-webkit-box-shadow: 3px 3px 100px 4px rgba(153,153,153,1);
-moz-box-shadow: 3px 3px 100px 4px rgba(153,153,153,1);
box-shadow: 3px 3px 100px 4px rgba(153,153,153,1);
}
#home #homeImage > #homeImageMask
{
height: 100%;
width: 100%;
background-color: rgba(84, 17, 200, 0.6);
z-index: 91;
}
#home #homeText
{
z-index: 95;
}
#homeText h1#homePrimary,
#homeText h2#homeSecondary
{
color: #000;
text-align: center;
}
#homeText h1#homePrimary
{
font-size: 30px;
font-weight: 600;
margin-bottom: 10px;
}
#homeText h2#homeSecondary
{
font-family: 'Open Sans', sans-serif;
font-size: 16px;
font-weight: 600;
}
/* ABOUT SECTION */
#about p
{
line-height: 26px;
text-align: center;
}
#about #skillsList
{
width: 100%;
text-align: center;
margin-top: 50px;
}
#about #skillsList p:first-of-type
{
margin-bottom: 10px;
}
#about #skillsList p.skillItem
{
display: inline;
margin: 0 15px;
}
what about simplifying like this:
body, h1, h2 {
margin: 0;
}
.box-content {
width: 30vw;
height: 30vw;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
padding: 100px 30px;
box-sizing: border-box;
background: rgba(84, 17, 200, 0.6);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
box-shadow: 3px 3px 100px 4px rgba(153, 153, 153, 1);
text-align: center;
}
<div class="sectionContent">
<div id="homeText" class="box-content">
<h1 id="homePrimary">Home Text Primary</h1>
<h2 id="homeSecondary">Home Text Secondary</h2>
</div>
</div>
You can remove absolute css property from selector '#home #homeImage' issue is fixed at my end

Hide image overlay before hover, css animation

I would like the overlay content to come from bottom of the image when hovered, but for some reason it's always visible, am I missing something with positioning? Here's the pen: http://codepen.io/anon/pen/PbjVgy
* {
background-color: grey;
color: white;
}
.about__images {
max-width: 800px;
margin: 0 auto;
}
.about__inner {
margin-top: 60px;
}
.about__inner img {
max-width: 100%;
margin-right: 20px;
}
/**/
.about .about__inner {
position: relative;
}
.about .about__inner .about__inner--overlay {
position: absolute;
top: 100%;
left: 15px;
text-align: center;
background: rgba(0, 0, 0, 0.8);
width: 89%;
height: 100%;
transition: all 0.1s ease-in;
}
p {
margin-top: 60px;
}
.about .about__inner:hover .about__inner--overlay {
top: 0;
}
<section class="about">
<h5 class="small__title">Lorem ipsum</h5>
<p class="description">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Beatae commodi nisi aut animi, excepturi impedit dicta natus culpa. Veniam atque sapiente assumenda fugiat tempore ipsam eos quae</p>
<div class="container">
<div class="about__images">
<div class="row">
<div class="about__inner col-md-4">
<img src="https://placeholdit.imgix.net/~text?txtsize=37&txt=390%C3%97259&w=390&h=259" alt="">
<div class="about__inner--overlay">
<p>overlay content</p>
</div>
</div>
<div class="about__inner col-md-4">
<img src="https://placeholdit.imgix.net/~text?txtsize=37&txt=390%C3%97259&w=390&h=259" alt="">
<div class="about__inner--overlay">
<i class="fa fa-user" aria-hidden="true"></i>
<p>overlay content</p>
</div>
</div>
<div class="about__inner col-md-4">
<img src="https://placeholdit.imgix.net/~text?txtsize=37&txt=390%C3%97259&w=390&h=259" alt="">
<div class="about__inner--overlay">
<i class="fa fa-user" aria-hidden="true"></i>
<p>overlay content</p>
</div>
</div>
</div>
</div>
</div>
</section>
Add overflow: hidden to .about__inner
.about__inner {
margin-top: 60px;
overflow: hidden;
}
http://codepen.io/anon/pen/ENXMxW

Stacked glyphicons with Font Awesome

I have the fa-circle-thin in which i want to place a glyphicon, so that it looks like there is a round border around my glyphicon. I just want to know if this is even possible?
I've tried following:
<div class="col-md-4">
<span class="circle">
<i class="glyphicon glyphicon-star"></i>
</span>
<h4 class="service-heading">Lorem</h4>
<p class="text-muted">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima maxime quam architecto quo inventore harum ex magni, dicta impedit.</p>
</div>
However the two icons shows up side by side. I made a class for my FA that looks like this:
.circle:before {
font-family: fontawesome-webfont;
text-decoration: none;
content: "\f1db";
background-color: transparent;
z-index:-1;
}
I'd just use border-radius: 50% instead of trying to position two glyphs (plus you can style the border!). I'm also centering things with text-align: center and by matching the line-height and height values:
.circle {
border: 1px solid black;
border-radius: 50%;
padding: 3px;
width: 25px;
height: 25px;
display: inline-block;
text-align: center;
line-height: 25px;
}
.alt {
border-width: 2px;
border-color: red;
color: red;
width: 15px;
height: 15px;
line-height: 15px;
}
<div class="circle">
🌟
</div>
<div class="circle alt">
🌟
</div>
How about using posiiton:absolute?
.glyphicon{
position: absolute;
top: 3px;
left: 15px;
}
Result: jsfiddle

Resources