I'm having some problems with Bootstrap columns, they are not working the way they are suppose to. In the picture below the 4 profile boxes have to be centered...the same way the 3 columns are centered in the "smart & creative" section. Unfortunately I can't link to a jsfiddle but I have provided code for you to look at below the image, In the code section scroll down for css.
<!-- smart and creative -->
<div class="smart-creative">
<div class="row">
<div class="container">
<div class="title col-xs-12">
<h2>Smart & Creative</h2>
<p>This is why you will use it :)</p>
</div>
</div>
</div>
<div class="row">
<div class="container">
<div class="circles col-md-4 col-sm-4">
<div class="circle1"></div>
<h4>Multi purpose</h4>
<p>Lorem ipsum dolor sit amet,<br /> consectetur adipisicing..</p>
</div>
<div class="circles col-md-4 col-sm-4">
<div class="circle2"></div>
<h4>Flat UI</h4>
<p>Lorem ipsum dolor sit amet,<br /> consectetur adipisicing..</p>
</div>
<div class="circles col-md-4 col-sm-4">
<div class="circle3"></div>
<h4>Creative Design</h4>
<p>Lorem ipsum dolor sit amet,<br /> consectetur adipisicing..</p>
</div>
</div>
</div>
</div>
<!-- Team -->
<div class="team">
<div class="row">
<div class="container">
<div class="team-title col-md-12">
<h2>Talented & Experts</h2>
<p>This is our team</p>
</div>
</div>
</div>
<div class="row">
<div class="container">
<div class="profile-wrapper">
<div class="profiles pic1 col-md-3 col-sm-3">
<div class="pic-holder">
</div>
<div class="desc">
<h5>Mahmoud Baghagho<h5>
<p>Senior UI Designer</p>
</div>
<div class="twitter-button">
<span class="fa fa-twitter">Follow</span>
</div>
</div>
<div class="profiles pic1 col-md-3 col-sm-3">
<div class="pic-holder">
</div>
<div class="desc">
<h5>Mahmoud Baghagho<h5>
<p>Senior UI Designer</p>
</div>
<div class="twitter-button">
<span class="fa fa-twitter">Follow</span>
</div>
</div>
<div class="profiles pic1 col-md-3 col-sm-3">
<div class="pic-holder">
</div>
<div class="desc">
<h5>Mahmoud Baghagho<h5>
<p>Senior UI Designer</p>
</div>
<div class="twitter-button">
<span class="fa fa-twitter">Follow</span>
</div>
</div>
<div class="profiles pic1 col-md-3 col-sm-3">
<div class="pic-holder">
</div>
<div class="desc">
<h5>Mahmoud Baghagho<h5>
<p>Senior UI Designer</p>
</div>
<div class="twitter-button">
<span class="fa fa-twitter">Follow</span>
</div>
</div>
</div>
</div>
</div>
</div>
CSS
// Smart and Creative
.smart-creative{
background-color: $theme1-color;
color: white;
.title{
text-align: center;
padding-top: 10px;
p{
color: $header-color;
}
}
.circles{
padding-top: 25px;
h4,p{
text-align: center;
}
p{
color: $header-color;
}
.css-for-circle{
height: 100px;
width: 100px;
background-color: $header-color;
border-radius: 50px;
background-position: center;
background-repeat: no-repeat;
margin: 0 auto;
}
.circle1{
background-image: url("../imgs/multi.png");
#extend .css-for-circle;
}
.circle2{
background-image: url("../imgs/flat.png");
#extend .css-for-circle;
}
.circle3{
background-image: url("../imgs/creative.png");
#extend .css-for-circle;
}
}
}
// Team
.team{
background-color: $theme2-color;
.team-title{
h2,p{
text-align: center;
}
}
.profile-wrapper{
margin: 0 auto;
width: 95%;
overflow: hidden;
.profiles{
max-width: 230px;
height: 341px;
background-color: white;
border-radius: 5px;
.pic-holder{
max-width: 164px;
height: 164px;
border-radius: 82px;
background-color: $theme2-color;
margin: 0 auto;
position: relative;
top: 25px;
box-shadow: inset 3px 3px 6px -2px #48804B;
-moz-box-shadow: inset 3px 3px 6px -2px #48804B;
-webkit-box-shadow: inset 3px 3px 6px -2px #48804B;
-o-box-shadow: inset 3px 3px 6px -2px #48804B;
background-image: url("http://placehold.it/147x147");
background-repeat: no-repeat;
background-size: 90%;
background-position: center;
}
.desc{
padding: 45px 0 20px 0;
h5,p{
text-align: center;
}
}
.twitter-button{
max-width: 204px;
height: 43px;
background-color: $theme2-color;
margin: 0 auto;
border-radius: 2px;
.fa-twitter{
font-size: 35px;
color: white;
}
}
}
}
}
First of all, rows should be INSIDE containers.
But your real problem is setting a max-width here:
.profiles{max-width: 230px;}
You're not letting the columns expand to their natural width.
This div:
<div class="container">
should be the one holding:
<div class="row">
The correct way, for example:
<div class="container">
<div class="row">
<div class="title col-xs-12">
<h2>Smart & Creative</h2>
<p>This is why you will use it :)</p>
</div>
</div>
</div>
.team .profile-wrapper .profiles {
max-width: 230px;
}
Is making column width smaller then it should be.
I have created code-pan for you please check
http://codepen.io/payalpatel2299/pen/MbRwxo
Related
My page
I have installed a language switcher plugin, from LTR to RTL. in this page their is a raw html raw
THE ISSUE: when i switch the language to RTL the boxes goes to the extreme right and extreme left
what to add so when the user switches the language the boxes would have the same alignment as the english version
Code:
<div class="vc_row wpb_row vc_row-fluid" style="background: white;">
<div class="wpb_column vc_column_container vc_col-sm-12">
<div class="vc_column-inner">
<div class="wpb_wrapper">
<div class="vc_empty_space" style="height: 32px"><span class="vc_empty_space_inner"></span></div>
<div class="vc_empty_space" style="height: 32px"><span class="vc_empty_space_inner"></span></div>
<div class="widget-text-heading no-line">
<h3 class="title">
<span>WHY INVEST IN</span>
DUBAI ? </h3>
</div>
<div class="widget widget-features-box default">
<div class="content">
<div class="row">
<div class="col-xs-12 col-sm-6 box-align1">
<div class="feature-box box-model">
<div class="feature-box-inner">
<div class="fbox-icon">
<div class="icon-inner ">
<img class="img" src="https://new.universalprime.co/wp-content/uploads/2020/01/Asset-5#2x.png" alt="">
</div>
</div>
<div class="fbox-content ">
<h3 class="ourservice-heading">EXPO 2020</h3>
<div class="description">It expected that roughly 28 million people will visit Dubai by Expo 2020</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 box-align2">
<div class="feature-box box-model">
<div class="feature-box-inner">
<div class="fbox-icon">
<div class="icon-inner ">
<img class="img" src="https://new.universalprime.co/wp-content/uploads/2020/01/Asset-2#2x.png" alt="">
</div>
</div>
<div class="fbox-content ">
<h3 class="ourservice-heading">MULTI-SECTORED ECONOMY</h3>
<div class="description">65% of global investment and a multi-sectored economy that does not rely on oil.</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 box-align1">
<div class="feature-box box-model">
<div class="feature-box-inner">
<div class="fbox-icon">
<div class="icon-inner ">
<img class="img" src="https://new.universalprime.co/wp-content/uploads/2020/01/Asset-8#2x.png" alt="">
</div>
</div>
<div class="fbox-content ">
<h3 class="ourservice-heading">INVESTMENT-FRIENDLY</h3>
<div class="description">A safe country for investment, supported with 0% income tax policy and facilitated by laws that ease business creation.</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 box-align2">
<div class="feature-box box-model">
<div class="feature-box-inner">
<div class="fbox-icon">
<div class="icon-inner ">
<img class="img" src="https://new.universalprime.co/wp-content/uploads/2020/01/Asset-7#2x.png" alt="">
</div>
</div>
<div class="fbox-content ">
<h3 class="ourservice-heading">PASSPORT RECOGNITION</h3>
<div class="description" style="margin: 0 0 26px 0;">The strongest Passport
<br>world-wide</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 box-align1">
<div class="feature-box box-model">
<div class="feature-box-inner">
<div class="fbox-icon">
<div class="icon-inner ">
<img class="img" src="https://new.universalprime.co/wp-content/uploads/2020/01/Asset-3#2x.png" alt="">
</div>
</div>
<div class="fbox-content ">
<h3 class="ourservice-heading">GLOBAL HUB</h3>
<div class="description">Dubai airport is considered the 3rd most visited in the world, they celebrated the 1 Billionth traveler in 2018</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 box-align2">
<div class="feature-box box-model">
<div class="feature-box-inner">
<div class="fbox-icon">
<div class="icon-inner ">
<img class="img" src="https://new.universalprime.co/wp-content/uploads/2020/01/Asset-6#2x.png" alt="">
</div>
</div>
<div class="fbox-content ">
<h3 class="ourservice-heading">RELIABLE INVESTMENT</h3>
<div class="description">Investments worth 37 Billion AED from Gulf residents. Total transactions reached 111 Billion in Dubai 2018.</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<style>
.description {
margin: 0 0 20px 0;
}
.icon-inner{
background:#fff !important;
box-shadow:none;
}
#media only screen and (max-width: 767px) {
.col-xs-12 {
padding: 0px 14%;
}
}
#media only screen and (min-width: 768px) {
.col-sm-6 {
height: 240px;
width: 25%;
margin: 23px 12%;
background: whitesmoke;
box-shadow: 2px 2px 30px -6px #8e99a3;
margin-bottom: 80px;
}
.box-model {
position: absolute;
top: -95px;
left: 10%;
width: 80%;
}
.box-align1{
right:-80px !important;
}
.box-align2{
left:-80px !important;
}
.title{
margin-bottom:80px !important;
}
}
#media only screen and (min-width: 992px) {
.col-sm-6 {
height: 238px;
width: 25%;
margin: 23px 12%;
background: whitesmoke;
box-shadow: 2px 2px 30px -6px #8e99a3;
margin-bottom: 90px;
}
.box-model {
position: absolute;
top: -95px;
left: 10%;
width: 80%;
}
.box-align1{
right:-105px !important;
}
.box-align2{
left:-105px !important;
}
.title{
margin-bottom:80px !important;
}
}
#media only screen and (min-width: 1141px) {
.col-sm-6 {
width: 25%;
margin: 23px 12%;
background: whitesmoke;
box-shadow: 2px 2px 30px -6px #8e99a3;
height: 230px !important;
margin-bottom: 100px;
}
.box-model {
position: absolute;
top: -95px;
width: 80%;
left: 10%;
}
.box-align1{
right:-126px !important;
}
.box-align2{
left:-126px !important;
}
.title{
margin-bottom:80px !important;
}
}
#media only screen and (min-width: 1141px) {
.box-align1{
right:-114px !important;
}
.box-align2{
left:-114px !important;
}
}
#media only screen and (min-width: 1200px) {
.box-align1{
right:-125px !important;
}
.box-align2{
left:-125px !important;
}
}
#media only screen and (min-width: 1290px) {
.box-align1{
right:-162px !important;
}
.box-align2{
left:-162px !important;
}
}
</style>
Need to position and make my product cards look more like the ones shown in the image below
https://prnt.sc/mip9eb
i have tried using float:left; but it only made 2 of the product cards position correctly.
These were made using bootstrap
.container {
width: 100%;
height: 100%;
}
.container .product {
width: 390px;
height: 130px;
display: flex;
margin: 1em 0;
border-radius: 5px;
overflow: hidden;
cursor: pointer;
box-shadow: 0px 0px 21px 3px rgba(0, 0, 0, 0.15);
transition: all .1s ease-in-out;
float: left;
}
.container .product .img-container {
flex: 2;
}
.container .product .img-container img {
object-fit: cover;
width: 100%;
height: 100%;
}
.container .product .product-info {
background: #fff;
flex: 3;
}
.container .product .product-info .product-content {
padding: .2em 0 .2em 1em;
}
.container .product .product-info .product-content h1 {
font-size: 1.5em;
}
.container .product .product-info .product-content p {
color: #636363;
font-size: .9em;
font-weight: bold;
width: 90%;
}
.container .product .product-info .product-content ul li {
color: #636363;
font-size: 9em;
margin-left: 0;
}
.container .product .product-info .product-content .buttons {
padding-top: .4em;
}
.container .product .product-info .product-content .buttons .button {
text-decoration: none;
color: #5e5e5e;
font-weight: bold;
padding: .3em .65em;
border-radius: 2.3px;
transition: all .1s ease-in-out;
}
.container .product .product-info .product-content .buttons .buy {
border: 1px #5e5e5e solid;
}
<div class="container">
<div class="product">
<div class="img-container">
<img src="https://icdn2.digitaltrends.com/image/oculus-go-press-720x720.jpg">
</div>
<div class="product-info">
<div class="product-content">
<h1>Oculus Go</h1>
<ul>
<li>Lorem ipsum dolor sit ametconsectetu.</li>
<li>adipisicing elit dlanditiis quis ip.</li>
</ul>
<div class="buttons">
<a class="button buy" href="#">More Info</a>
</div>
</div>
</div>
</div>
</div>
Can someone guide me on how i can make the individual product cards look more like the ones in the image and how to position all 3 of them in a row
I think this is more like what you want.. You needed to wrap your product divs in bootstrap col-12 col-lg-4 columns. (see example full screen so the boxes don't wrap). This will show you 1 column layout on mobile and 3 column layout on large devices like desktops.
Some help on your original code:
- You didn't need the float values
- Your font size was also way too big for your boxes.
- Also, try not to specify height and width for the boxes so that the content fits.
.container .product {
display: flex;
margin: 1em 0;
border-radius: 5px;
cursor: pointer;
box-shadow: 0px 0px 21px 3px rgba(0, 0, 0, 0.15);
transition: all .1s ease-in-out;
}
.container .product .img-container {
flex: 2;
justify-content: center;
align-items: center;
display: flex;
}
.container .product .img-container img {
width: 100%;
height: auto;
}
.container .product .product-info {
background: #fff;
flex: 3;
}
.container .product .product-info .product-content {
padding: .2em 0 .2em 1em;
}
.container .product .product-info .product-content h1 {
font-size: 1.5em;
}
.container .product .product-info .product-content p {
color: #636363;
font-size: .9em;
font-weight: bold;
width: 90%;
}
.container .product .product-info .product-content ul li {
color: #636363;
margin-left: 0;
}
.container .product .product-info .product-content .buttons {
padding-top: .4em;
}
.container .product .product-info .product-content .buttons .button {
text-decoration: none;
color: #5e5e5e;
font-weight: bold;
padding: .3em .65em;
border-radius: 2.3px;
transition: all .1s ease-in-out;
}
.container .product .product-info .product-content .buttons .buy {
border: 1px #5e5e5e solid;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<div class="container">
<div class="row">
<div class="col-12 col-lg-4">
<div class="product">
<div class="img-container">
<img src="https://icdn2.digitaltrends.com/image/oculus-go-press-720x720.jpg">
</div>
<div class="product-info">
<div class="product-content">
<h1>Oculus Go</h1>
<ul>
<li>Lorem ipsum dolor sit ametconsectetu.</li>
<li>adipisicing elit dlanditiis quis ip.</li>
</ul>
<div class="buttons">
<a class="button buy" href="#">More Info</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-4">
<div class="product">
<div class="img-container">
<img src="https://icdn2.digitaltrends.com/image/oculus-go-press-720x720.jpg">
</div>
<div class="product-info">
<div class="product-content">
<h1>Oculus Go</h1>
<ul>
<li>Lorem ipsum dolor sit ametconsectetu.</li>
<li>adipisicing elit dlanditiis quis ip.</li>
</ul>
<div class="buttons">
<a class="button buy" href="#">More Info</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-4">
<div class="product">
<div class="img-container">
<img src="https://icdn2.digitaltrends.com/image/oculus-go-press-720x720.jpg">
</div>
<div class="product-info">
<div class="product-content">
<h1>Oculus Go</h1>
<ul>
<li>Lorem ipsum dolor sit ametconsectetu.</li>
<li>adipisicing elit dlanditiis quis ip.</li>
</ul>
<div class="buttons">
<a class="button buy" href="#">More Info</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
You should use bootstrap their class names to trigger their styling, bootstap does not require alot of extra css.
You could try using this as a start to your project:
Boostrap Cards documentation
<div class="card-deck">
<div class="card">
<img class="card-img-top" src="https://icdn2.digitaltrends.com/image/oculus-go-press-720x720.jpg" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Oculus Go</h5>
<p class="card-text">Lorem ipsum dolor sit ametconsectetu.</p>
<p class="card-text"><small class="text-muted">adipisicing elit dlanditiis quis ip.</small></p>
</div>
</div>
<div class="card">
<img class="card-img-top" src="https://icdn2.digitaltrends.com/image/oculus-go-press-720x720.jpg" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Oculus Go</h5>
<p class="card-text">Lorem ipsum dolor sit ametconsectetu.</p>
<p class="card-text"><small class="text-muted">adipisicing elit dlanditiis quis ip.</small></p>
</div>
</div>
<div class="card">
<img class="card-img-top" src="https://icdn2.digitaltrends.com/image/oculus-go-press-720x720.jpg" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Oculus Go</h5>
<p class="card-text">Lorem ipsum dolor sit ametconsectetu.</p>
<p class="card-text"><small class="text-muted">adipisicing elit dlanditiis quis ip.</small></p>
</div>
</div>
</div>
Use your each product inside bootstrap column just like below it will atomically position correctly also see the example here. In this example I remove float left and made width 100% from product class
<div class="container">
<div class="row">
<div class="col-lg-4">
<div class="product">
</div>
</div>
<div class="col-lg-4">
<div class="product">
</div>
</div>
<div class="col-lg-4">
<div class="product">
</div>
</div>
</div>
</div>
You can get your desired style by much more easier code by using Bootstrap classes. You can try this process:
.container {
margin-top: 50px;
}
.card {
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
}
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="card">
<div class="card-body row">
<img class="card-img-top col-lg-5" src="https://via.placeholder.com/100x100.png?text=Oculus Go" alt="Card image cap">
<div class=" col-lg-7">
<h5 class="card-title">Oculus Go</h5>
<ul class="card-text">
<li>List Text One</li>
<li>List Text Two</li>
</ul>
More Info
</div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="card">
<div class="card-body row">
<img class="card-img-top col-lg-5" src="https://via.placeholder.com/100x100.png?text=HTC Vive" alt="Card image cap">
<div class=" col-lg-7">
<h5 class="card-title">HTC Vive</h5>
<ul class="card-text">
<li>List Text One</li>
<li>List Text Two</li>
</ul>
More Info
</div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="card">
<div class="card-body row">
<img class="card-img-top col-lg-5" src="https://via.placeholder.com/100x100.png?text=Cardboard" alt="Card image cap">
<div class=" col-lg-7">
<h5 class="card-title">Cardboard</h5>
<ul class="card-text">
<li>List Text One</li>
<li>List Text Two</li>
</ul>
More Info
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"></script>
<script type="text/javascript" src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"></script>
This design is responsive. Try full screen and different sizes.
I have the following code where the bottom section is not displaying and I am not sure why.
This is the part that doesn't display:
<div class="tribeconversation">
<div class="tribeconvo">Joeyc: hey everyone</div>
<div class="tribeconvo">JakeP97: hello joey</div>
<div class="tribeconvo">Joeyc: oi m8, whats up</div>
<div class="tribeconvo">TheKid: LOL hey JakeP</div>
<div class="tribeconvo">Joeyc: RIP</div>
</div>
Fiddle here: https://jsfiddle.net/smvbaa6u/
You've set font-size: 0 to tribeactivity - reset it to initial for the tribeconversation - see demo below:
#tribeactivity {
text-align: center;
font-size: 0;
}
#Amuraheader {
font-family: 'survival';
font-size: 80px;
text-align: center;
color: #2B32E4;
text-shadow: 3px 3px 1px #ffffff;
}
#Malosiheader {
font-family: 'survival';
font-size: 80px;
text-align: center;
color: #DB282B;
text-shadow: 3px 3px 1px #ffffff;
margin-top: 30px;
}
.tribeavi {
width: 149px;
height: 186px;
background-size: cover;
display: inline-block;
}
.tribeaviname {
font-size: 18px;
font-family: 'survival';
text-align: center;
width: 100%;
height: 27px;
padding-top: 3px;
top: 156px;
position: relative;
background-color: rgba(0,0,0,0.7);
color: white;
}
.tribeconversation {
display: inline-block;
font-size: initial;
}
<div id="tribeactivity">
<div id="Amuraheader">Amura</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/Riku1274-14154.png?v=2053856125')">
<div class="tribeaviname">Riku1274</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/realityobsessed-7881.png?v=625345208')">
<div class="tribeaviname">Reality</div>
</div>
<div class="tribeavi" style="background-image: url('http://www.zwooper.com/media/avatars/johnnyscott1127-7443.png?v=590056866')">
<div class="tribeaviname">Johnny</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/exploremedora-7274.png?v=1507280925')">
<div class="tribeaviname">ExploreMe</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/yswimmer96-1356.png?v=386446076')">
<div class="tribeaviname">Yswimmer</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/xStqqd-16258.png?v=173536863')">
<div class="tribeaviname">xStqqd</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/AngelOfWater-885.png?v=430260016')">
<div class="tribeaviname">Angelofwater</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/a07strand-9696.png?v=259628760')">
<div class="tribeaviname">A07Strand</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/JakeP97-3100.png?v=529092857')">
<div class="tribeaviname">JakeP97</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/joeyc-13212.png?v=101411917')">
<div class="tribeaviname">JoeyC</div>
</div>
<div id="Malosiheader">Malosi</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/SuperDoodle-2870.png?v=1868660820')">
<div class="tribeaviname">SuperDoodle</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/wwxcrunner1-1056.png?v=48014610')">
<div class="tribeaviname">wwxcrunner</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/King_Canine-10700.png?v=327204573')">
<div class="tribeaviname">King_Canine</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/WILLZ14-8313.png?v=620214729')">
<div class="tribeaviname">Willz14</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/BostonRob524-7935.png?v=1279836291')">
<div class="tribeaviname">BostonRob</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/devon19-10680.png?v=168166820')">
<div class="tribeaviname">Devon19</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/Alvarovidalpuga-8630.png?v=1796517703')">
<div class="tribeaviname">Alvaro</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/Ginger7-4349.png?v=564697580')">
<div class="tribeaviname">Ginger7</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/TheKid-22456.png?v=626667976')">
<div class="tribeaviname">TheKid</div>
</div>
<div class="tribeavi" style="background-image: url('http://zwooper.com/media/avatars/joeyc-13212.png?v=101411917')">
<div class="tribeaviname">Krystiian</div>
</div>
<div class="tribeconversation">
<div class="tribeconvo">Joeyc: hey everyone</div>
<div class="tribeconvo">JakeP97: hello joey</div>
<div class="tribeconvo">Joeyc: oi m8, whats up</div>
<div class="tribeconvo">TheKid: LOL hey JakeP</div>
<div class="tribeconvo">Joeyc: RIP</div>
</div>
</div>
The div .tribeconvo inherits a font-size:0; from #tribeactivity.
#tribeactivity {
text-align: center;
font-size: 0;
}
Therefore, the .tribeconversation div has a height:0 and doesn't appear. Just add a font size bigger than 0 to .tribeconvo to fix this.
.tribeconvo{
font-size: 16px;
}
I have a navigation bar, but i don't know how to vertically align some classes.
I use bootstrap. The navigation bar is fixed position. The navbar is divided into 3 row. The search row is OK, but I can't vertically align the another rows.
Here is the HTML:
<div class="col-sm-10" >
<p>Reményik Tudástár</p>
</div>
</div>
</div>
</div>
<div class="col-sm-4 navbar-search vertical-align">
<div class="container-fluid">
<div class="row vertical-align">
<div class="col-sm-1"></div>
<div class="col-sm-9" style="padding: 0;">
<input type="text" name="search" class="navbar-search-input" placeholder="Keresés">
</div>
<div class="col-sm-1" style="">
<button class="navbar-search-button"><i class="fa fa-search"></i></button>
</div>
<div class="col-sm-1"></div>
</div>
</div>
</div>
<div class="col-sm-4 navbar-login" style="">
<div class="container-fluid">
<div class="row">
<div class="col-sm-10">
<p style="float: right;">Bejelentkezés</p>
</div>
<div class="col-sm-2">
<span class="fa fa-sign-in fa-2x"></span>
</div>
</div>
</div>
</div>
</div>
and here is the CSS:
.navigation-bar {
background-image: url("../img/nav_background.png");
padding: 15px;
box-shadow: 0px 2px 5px #999999;
}
.navbar-search-input {
width: 100%;
border: 0;
border-radius: 3px 0 0 3px;
height: 35px;
padding: 10px;
}
.navbar-search-button {
background-color: #203138;
color: #fff;
margin-right: 100%;
border: 0;
border-radius: 0 3px 3px 0;
height: 35px;
padding-left: 12px;
padding-right: 12px;
}
So, how can I vertically align the logo and the cim class?
Try this:-
display: inline-block;
*display: inline;
vertical-align: middle;
I am trying to achieve this:
I want the three panels in the gray <div> to overlap with the white jumbotron above them. How can I do this in CSS or with Bootstrap?
HTML:
<div id="home-page">
<div class="container text-center">
<div class="row">
<div class="col-sm-4">
<div class="panel">
</div>
</div>
<div class="col-sm-4">
<div class="panel">
</div>
</div>
<div class="col-sm-4">
<div class="panel">
</div>
</div>
</div>
</div>
<div class="container">
<h3>Passionate About Technology?</h3>
<p>We make and effort to learn something everyday</p>
LEARN
</div>
</div>
CSS
#home-page { background: #EFEFEF; }
#home-page .panel { box-shadow: 0px 0px 10px gray; margin: 15px; }
Thanks!
I was able to replicate the pic you had with a few adjustments to your code:
here is the css:
#home-page {
background: #EFEFEF;
}
#home-page .panel {
box-shadow: 0px 0px 10px gray;
margin: 15px;
margin-top:-50px;
height:200px;
}
#jumbo{
height:100px;
}
I also added a div on top to get that effect
<div id="jumbo"></div>
please see my codepen
http://codepen.io/sammyb123/pen/dMJaRw
View below snippet in Full page. If you want the same effect on smaller devices then use col-xs instead.
#home-page .panel {
box-shadow: 0px 0px 10px gray;
height: 250px;
margin-top: -15px;
}
#home-page .jumbo-ctr {
background: #fff;
margin-bottom: 20px;
}
#home-page .panel-ctr {
background: #EFEFEF;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<div id="home-page">
<div class="container jumbo-ctr">
<h3>Passionate About Technology?</h3>
<p>We make and effort to learn something everyday</p>
LEARN
</div>
<div class="container-fluid text-center panel-ctr">
<div class="row">
<div class=" col-sm-offset-3 col-sm-2 ">
<div class="panel">
</div>
</div>
<div class="col-sm-2 ">
<div class="panel">
</div>
</div>
<div class="col-sm-2 ">
<div class="panel"></div>
</div>
</div>
</div>
</div>