How to achieve a layout with 3 columns and a footer - html

I am trying to build this footer with bootstrap 3.3. The footer looks like this:
Text Left - Social Icons - Text Right
Here is what I tried:
http://jsfiddle.net/bsumgcpk/1/
<div class="container black">
<div class="col-xs-6 col-sm-4 white"><p> COPYRIGHT © 2014</p></div>
<div class="col-xs-6 col-sm-4 white text-center">
<img src="icon-g-.png" alt="google+">
<img src="icon-twitter.png" alt="twitter">
<img src="icon-fb.png" alt="facebook">
</div>
<div class="col-xs-6 col-sm-4 right"><p> right text</p></div>
</div>

You forgot to put the columns inside row div.Bootstrap has 12 column grid system, so the sum of your columns should be 12.Thats why i used 3 columns of size 4.
Working JSFiddle.
p {
color: white;
}
.black {
background: #000;
}
.right {
text-align:right;
}
<link href="http://www.kissingerassoc.com/~order-portal/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container black">
<div class="row">
<div class="col-xs-4 col-sm-4 white">
<p>COPYRIGHT © BITPHONE.ES 2014</p>
</div>
<div class="col-xs-4 col-sm-4 white text-center">
<img src="https://bitphone.es/wp-content/uploads/2015/07/icon-g-.png" alt="google+" />
<img src="https://bitphone.es/wp-content/uploads/2015/07/icon-twitter.png" alt="twitter" />
<img src="https://bitphone.es/wp-content/uploads/2015/07/icon-fb.png" alt="facebook" />
</div>
<div class="col-xs-4 col-sm-4 right">
<p>right text</p>
</div>
</div>
</div>

Related

horizontal Bootstrap Thumbnails

i have problem in Bootstrap Thumbnails.
my thumbnails is like that:
img01. but want to be horizontal.
What am i doing ?
My Code:
HTML:
<div class="hrs" align="center">
<div class="row">
<div class="col-xs-6 col-lg-6 col-md-6 col-sm-6">
<div class="thumbnail">
<img src="img/AxMahsool.jpg" alt="AxMahsool01" class="img-responsive" />
<img src="img/AxMahsool.jpg" alt="AxMahsool02" class=" img-responsive" />
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-lg-6 col-md-6 col-sm-6">
<div class="thumbnail">
<img src="img/AxMahsool.jpg" alt="AxMahsool03" class=" img-responsive" />
<img src="img/AxMahsool.jpg" alt="AxMahsool04" class=" img-responsive" />
</div>
</div>
</div>
</div>
Css:
.hrs{
display: table;
margin: 0 auto;
padding: 20px;
color: white;
It's because you have them in separate <div class="row"> containers. What you should do is put all of your images in the same row container(so take out the second <div class="row">) -and/or- try adding this code to your CSS:
.thumbnail>img { display: inline-block; }

4 Centered Images HTML/ CSS BOOTSTRAP

--FIRST IMAGE IS DESIRE OUTPUT---
I got it to work on my screen but when I put it on bigger monitor doesn't seem to scale right. Any Recommendations ?
<div style="margin-left: 100px;margin-right: 100px;">
<div class="container-fluid">
<div class="row">
<div class="col-sm-3">
<img src="img/NUESTROS EVENTOS -1.png">
</div>
<div class="col-sm-3">
<img s src="img/NUESTROS EVENTOS -2.png">
</div>
<div class="col-sm-3">
<img src="img/NUESTROS EVENTOS -3.png">
</div>
<div class="col-sm-3">
<img src="img/NUESTROS EVENTOS -5.png">
</div>
</div>
</div>
This is what I get with this other code, centers but can't get rid the spaces.
---THIS IS WHAT I GET---
<div class="row" style="margin-bottom: 70px;">
<!-- column -->
<div class="col-xs-6 col-sm-5cols wow bounceInLeft ">
<div class="thumbnail ">
<img src="img/NUESTROS EVENTOS -1.png">
</div>
</div>
<!-- column -->
<div class="col-xs-6 col-sm-5cols wow bounceInLeft ">
<div class="thumbnail">
<img src="img/NUESTROS EVENTOS -2.png">
</div>
</div>
<!-- column -->
<div class="col-xs-6 col-sm-5cols wow swing ">
<div class="thumbnail">
<img src="img/NUESTROS EVENTOS -3.png">
</div>
</div>
<!-- column -->
<!-- column -->
<div class="col-xs-6 col-sm-5cols wow bounceInRight ">
<div class="thumbnail">
<img src="img/NUESTROS EVENTOS -5.png">
</div>
</div>
</div>
You can use inline-block elements, I have created inline-block class to wrap img and gave text-center class to row to align images in center.
.row-custom .inline-block{
display:inline-block;
}
.row-custom .inline-block img{
max-width:100px
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row row-custom text-center">
<div class="inline-block">
<img src="https://placeholdit.imgix.net/~text?txtsize=28&txt=300%C3%97300&w=300&h=300">
</div>
<div class="inline-block">
<img s src="https://placeholdit.imgix.net/~text?txtsize=28&txt=300%C3%97300&w=300&h=300">
</div>
<div class="inline-block">
<img src="https://placeholdit.imgix.net/~text?txtsize=28&txt=300%C3%97300&w=300&h=300">
</div>
<div class="inline-block">
<img src="https://placeholdit.imgix.net/~text?txtsize=28&txt=300%C3%97300&w=300&h=300">
</div>
</div>
Don't need to change or add more into CSS, You can use the Bootstrap class:
<div class="row">
<div class="col-sm-3">
<img class="img-responsive center-block" src="img/NUESTROS EVENTOS -1.png">
</div>
<div class="col-sm-3">
<img class="img-responsive center-block" src="img/NUESTROS EVENTOS -2.png">
</div>
<div class="col-sm-3">
<img class="img-responsive center-block" src="img/NUESTROS EVENTOS -3.png">
</div>
<div class="col-sm-3">
<img class="img-responsive center-block" src="img/NUESTROS EVENTOS -5.png">
</div>
</div>
Do these 3 things to achieve the desire result-
1. Add .img-responsive class to your img tags as its a way to make images responsive in bootstrap framework. You can also check this link for reference .
2. Add width="100%" to images to take up full space available in the image.
3. Add nopadding class to columns so that it will remove the padding space.
Update your code as below:
.nopadding {
padding: 0 !important;
margin: 0 !important;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="row">
<div class="col-xs-3 nopadding">
<img src="https://dummyimage.com/600x400/000/fff" width="100%" class="img-responsive">
</div>
<div class="col-xs-3 nopadding">
<img s src="https://dummyimage.com/600x400/000/fff" class="img-responsive" width="100%">
</div>
<div class="col-xs-3 nopadding">
<img src="https://dummyimage.com/600x400/000/fff" class="img-responsive" width="100%">
</div>
<div class="col-xs-3 nopadding">
<img src="https://dummyimage.com/600x400/000/fff" class="img-responsive" width="100%">
</div>
</div>
</div>

Image gets really small when I put it in a column

My png images gets really small when I put them inside a column in a row. However they are fine when there is not column but then they do not appear as a row and appear one above the other. I have no idea what may be causing the problem.
What I want to do: I want them to appear like this.
<div class="container">
<div class="row" id="parent">
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4 block left">
<div class="heading">
<h3> Simple to Enjoy </h3>
</div>
<div class="inside">
<div class="row">
<div class=""> <!--These Images!!!-->
<img class="img img-responsive img-sec-4" src="images\home_section_4_free_ride.png">
<p>Free Rides </p>
</div>
<div class="">
<img class="img img-responsive img-sec-4" src="images\home_section_4_membership.png">
<p>Free XXX Membership </p>
</div>
</div>
</div>
</div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4 block center">
<div class="heading">
<h3> Simple to Earn </h3>
</div>
<div class="inside">
</div>
</div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4 block right">
<div class="heading">
<h3> Simple to Save </h3>
</div>
<div class="inside">
</div>
</div>
</div>
</div>
Sorry for bad english and indent.
Here is my CSS:
#parent {
text-align:center;
height:400px;
width:100%;
}
.center {
margin:auto
}
.left {
margin:auto auto auto 0;
}
.right {
margin:auto 0 auto auto;
}
.img-sec-4 {
height: auto;
width: auto;
}
EDIT:
Here is the screenshot of my result:
(The red highlighted area is where the problem is)
simply add class col-xs-6 to the div wrapping those images (each one)
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row" id="parent">
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4 block left">
<div class="heading">
<h3> Simple to Enjoy </h3>
</div>
<div class="inside">
<div class="row">
<div class="col-xs-6">
<!--These Images!!!-->
<img class="img img-responsive img-sec-4" src="//lorempixel.com/200/200">
<p>Free Rides</p>
</div>
<div class="col-xs-6">
<img class="img img-responsive img-sec-4" src="//lorempixel.com/200/200">
<p>Free XXX Membership</p>
</div>
</div>
</div>
</div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4 block center">
<div class="heading">
<h3> Simple to Earn </h3>
</div>
<div class="inside">
</div>
</div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4 block right">
<div class="heading">
<h3> Simple to Save </h3>
</div>
<div class="inside">
</div>
</div>
</div>
</div>

How to add some space between in col-md-4?

In my school project. I am trying to create a photo gallery like view but I need that between two photos some space comes the code is here
<div class="container">
<h2 style="text-align: center;">Physics</h2>
<br>
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-2" style="background-color: aliceblue;">
<img class="img-responsive" class="thumbnail" class="img-center center-block" src="assets/GirishJain2.JPG" alt="Girish Jain">
<p style="text-align:justify;">
<b> Girish Jain</b> <br>
b.Tech,IIT-Delhi<br></br>
Exp 14 years
</p>
</div>
<div class="col-sm-6"></div>
<div class="col-md-2" style="background-color: lavender;">
<img class="img-responsive" src="assets/prateek.JPG" alt="Prateek Jain">
<p style="text-align:justify;">
<b> Prateek Jain</b> <br>
b.Tech-MNIT,Jaipu<br></br>
Exp 7 years
</p>
</div>
<div class="col-md-2" style="background-color: aliceblue;">
<img class="img-responsive" class="thumbnail" class="img-center center-block" src="assets/sidharthjain.JPG" alt="Siddharth Jain">
<p style="text-align:justify;">
<b> Sidharth Jain</b> <br>
b.Tech-MNIT,Jaipur<br></br>
Exp 14 years
</p>
</div>
</div>
</div>
and the pages like
below the physics section I want a some space between each photo
Allow the col-md-4 to continue to serve it's current purpose. You want the image to be inside of a div who's job will be to give space.
HTML
<div class="col-md-4 col-xs-4 col-sm-4">
<div class="image-padding">
<img class="img-responsive" src="https://placeholdit.imgix.net/~text?txtsize=33&txt=Iame"/>
</div>
</div>
CSS
.image-padding {
padding: 5px;
}
.image-padding img {
width: 100%;
}
CodePen
http://codepen.io/Goosecode/pen/oxaEjR
use the below it will work fine with you wrap it inside your container div
<link href="https://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="col-md-6 col-xs-6 col-sm-6">
<img class="img-responsive" src="https://placeholdit.imgix.net/~text?txtsize=33&txt=Iame&w=970"/>
</div>
<div class="col-md-6 col-xs-6 col-sm-6">
<img class="img-responsive" src="https://placeholdit.imgix.net/~text?txtsize=33&txt=Iame&w=970"/>
</div>
</div>
<hr>
<!--for other images !-->
<div class="row">
<div class="col-md-4 col-xs-4 col-sm-4">
<img class="img-responsive" src="https://placeholdit.imgix.net/~text?txtsize=33&txt=Iame"/>
</div>
<div class="col-md-4 col-xs-4 col-sm-4">
<img class="img-responsive" src="https://placeholdit.imgix.net/~text?txtsize=33&txt=Iame"/>
</div>
<div class="col-md-4 col-xs-4 col-sm-4">
<img class="img-responsive" src="https://placeholdit.imgix.net/~text?txtsize=33&txt=Iame"/>
</div>
</div>
This can be easily achieved using Bootstrap.
HTML
<div class="col-md-4" id="element">
Your Content.
</div>
CSS
#element {
padding-top: 5px;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
}

Bootstrap/CSS: Layout issues inside 3-columns layout

I'm using Bootstrap 3 and I have a full width row with 3 col-lg-4, each column with an icon, a title and a subtitle. But now I'd like to place the icon and text side by side, like this:
Initial HTML:
<div class="cover-container">
<div class="row">
<div class="col-lg-4">
<div class="tile">
<img src="" />
<h3>Title</h3>
<p>Lorem ipsum</p>
</div>
</div
…
…
</div>
</div>
.cover-container {
margin: 0 auto;
width: 100%;
padding: 0px;
}
.tile {
text-align: center;
}
I've tried with 8 col-lg-2, but I don't like that it shows each column as a row on a smartphone.
I prefer to use 3 centered col-lg-4, but I can not place elements like in the mock-up,
can you help? Thanks…
SOLUTION:
<div class="cover-container">
<div class="row">
<div class="col-sx-4 col-sm-4 col-md-4 col-lg-4">
<div class="row">
<div class="col-xs-6 cover-tile-image">
<img src="/assets/images/1.png" alt="" />
</div>
<div class="col-xs-6 cover-tile-text">
<h3>Title</h3>
<p>Lorem ipsum</p>
</div>
</div>
</div>
…
…
</div>
</div>
.cover-tile-image {
text-align: right;
padding-right: 5px;
}
.cover-tile-text {
padding-left: 5px;
}
I'm just going to point out to y'all that:
class="col-xs-4 col-sm-4 col-md-4 col-lg-4"
is extremely redundant, and equivalent to the much-simpler:
class="col-xs-4"
I encourage y'all to read Bootstrap's grid docs:
Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, applying any .col-md- class to an element will not only affect its styling on medium devices but also on large devices if a .col-lg- class is not present.
I'm still new in using bootstrap 3. Check the demo below I created. Hope this helps.
Fiddle
HTML
<div class=".col-xs-4 col-sm-4 col-md-4 col-lg-4">
<div class="tile">
<img src="http://placekitten.com/g/64/64" class="img-thumbnail" />
</div>
<div class="info">
<h3>Title</h3>
<p>Lorem ipsum</p>
</div>
</div>
CSS
.tile, .info {
float:left;
}
Here is the solution :) with working example.
Find here more information about the grids.
This solution is also RESPONSIVE READY.
HTML:
<div class="row well">
<div class="col-sx-4 col-sm-4 col-md-4 col-lg-4">
<div class="row ">
<div class="col-sx-3 col-sm-3 col-md-3 col-lg-3">
<img src="//placehold.it/50x50" />
</div>
<div class="col-sx-9 col-sm-9 col-md-9 col-lg-9">
<h3>Title</h3>
<p>Lorem ipsum</p>
</div>
</div>
</div> <div class="col-sx-4 col-sm-4 col-md-4 col-lg-4">
<div class="row ">
<div class="col-sx-3 col-sm-3 col-md-3 col-lg-3">
<img src="//placehold.it/50x50" />
</div>
<div class="col-sx-9 col-sm-9 col-md-9 col-lg-9">
<h3>Title</h3>
<p>Lorem ipsum</p>
</div>
</div>
</div> <div class="col-sx-4 col-sm-4 col-md-4 col-lg-4">
<div class="row ">
<div class="col-sx-3 col-sm-3 col-md-3 col-lg-3">
<img src="//placehold.it/50x50" />
</div>
<div class="col-sx-9 col-sm-9 col-md-9 col-lg-9">
<h3>Title</h3>
<p>Lorem ipsum</p>
</div>
</div>
</div>
</div>
CSS
h3{margin:0;}
HTML
<div id="wrapper">
<div class="row">
<div class="columns">
<img src="//placehold.it/100x100" />
</div>
<div class="columns">
<h3>Title</h3>
<p>Lorem ipsum</p>
</div>
</div>
<div class="row">
<div class="columns">
<img src="//placehold.it/100x100" />
</div>
<div class="columns">
<h3>Title</h3>
<p>Lorem ipsum</p>
</div>
</div>
<div class="row">
<div class="columns">
<img src="//placehold.it/100x100" />
</div>
<div class="columns">
<h3>Title</h3>
<p>Lorem ipsum</p>
</div>
</div>
</div>
CSS
#wrapper
{
width:1000px;
margin:0px;
padding:0px;
}
.columns
{
float:left;
display:inline-block;
width:120px;
height:110px;
}
Demos
Fiddle Demo
Result Demo
Output