Bootstrap 3 Text on the right of thumbnails - html

I have a question, basically using the thumbnails is ok, and you can get text beneath the tumbnail but i would like to put like 3 tags next to the thumbnail, something like that and would like to have:
Or those parameters outside of the border, but the border should be very close to the thumbnail ...
The code is following:
<div class="col-xs-6 col-md-3">
<a href="#" class="thumbnail">
<img data-src="holder.js/100%x180" src="untitled.png" alt="Generic placeholder thumbnail">
<ul>
<li>Title</li>
<li>Location</li>
<li>Price</li>
<ul>
</a>
</div>
From the post and responses i get the following in the fiddle, as well as in my solution, i marked it yellow, as you can see the border is somehow on the top now :( :
This is final screen, still broken: :(

The problem is that default bootstrap display property is set to block. Just change it to inline-flex or inline-block and thats it. For example:
<div id="someId" class="col-md-6">
<a href="#" class="thumbnail">
<div class="col-md-6">
<img data-src="holder.js/100%x180" src="untitled.png" alt="Generic placeholder thumbnail">
</div>
<div class="col-md-6">
<ul>
<li>Title</li>
<li>Location</li>
<li>Price</li>
</ul>
</div>
</a>
</div>
Just set id and in css write
#someId .thumbnail{
display: inline-flex;
}

that's quite easy, just divide the region in 2 equal parts and fill in the contents.
http://jsfiddle.net/fatgamer85/D5M7E/3/
<div class="col-md-6">
<a href="#" class="thumbnail">
<div class="col-md-6">
<img data-src="holder.js/100%x180" src="untitled.png" alt="Generic placeholder thumbnail">
</div>
<div class="col-md-6">
<ul>
<li>Title</li>
<li>Location</li>
<li>Price</li>
</ul>
</div>
</a>
</div>

Related

Html CSS footer alignment

I have developed a site on angular. All things are working fine. Now I want to adjust the footer.
Actual Footer
Expected Footer
Code
<footer>
<div class="row">
<div class="col-12">
<img src="../../assets/img/logo.svg" alt="" class="img-fluid" />
</div>
<div class="col-md-3 col-12">
<p>
<b>Manufactured by:</b>
</p>
</div>
<div class="col-md-2 col-6 mt-lg-0 mt-3">
<ul class="nav-menu">
<li>
<a [routerLink]="['/']">Home</a>
</li>
<li>
About us
</li>
<li>
Faqs
</li>
<li>
<a [routerLink]="['/latest-recipes']">recipes</a>
</li>
<li>
<a [routerLink]="['/stores']">Stores</a>
</li>
<!-- <li>
<a [routerLink]="['/where-to-buy']">where to buy</a>
</li> -->
</ul>
</div>
<div class="col-md-2 col-6 mt-lg-0 mt-3">
<ul class="px-0">
<li>Privacy & Policy</li>
<li>Terms & Condition</li>
</ul>
</div>
<div class="col-md-3 col-12">
<h1>Karachi Office</h1>
<p></p>
<h1>Lahore Office</h1>
<p></p>
<div class="social-icon d-flex align-items-center">
<i class="fab fa-facebook-f"></i>
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
</div>
</div>
<div class="col-md-2 col-12">
<img src="../../assets/img/ebs.png" class="img-fluif" />
</div>
</div>
</footer>
How can I align the footer? Any help would be highly appreciated.
You've made the image col-12 which will make the image spread across the full container. Remember that in bootstrap each container is split into 12, so saying that the image covers col-12 will cover all of them. From the looks of it you want to try around col-2.
Alternatively you could achieve the same without Bootstrap. Put the logo/manufactured by links in one div and float them left. Place the rest of the content in another div and float them right.
Add and Remover mt-3(margin-top) from the div.

Isotope gallery not always working properly

I am working on a isotope gallery, and sometimes its not working properly, i needed to refresh the page a few times because i made some changes to the front end, and i saw that the portfolio works different on each refresh.
EDIT: only does this on Chrome.
this is how it should work:
but sometimes it does things like this:
Here's the link to the website, and here is my isotope gallery code:
i left out a few items, since i found out it doesnt matter how much items i put in the gallery.
<!-- section works -->
<section id="section-works" class="section appear clearfix">
<div class="container">
<div class="row">
<nav id="filter" class="col-md-12 text-center">
<ul>
<li>Alles</li>
<li><a href="#" class="btn-theme btn-small" data-filter=".photo" >Foto's</a> </li>
<li>Video's </li>
</ul>
</nav>
<div class="col-md-12">
<div class="row">
<div class="portfolio-items isotopeWrapper clearfix" id="3">
<article class="col-md-4 isotopeItem photo">
<div class="portfolio-item">
<img src="img/portfolio/img1.jpg" alt="" />
<div class="portfolio-desc align-center">
<div class="folio-info">
<h5>Portfolio name</h5>
<i class="fa fa-expand fa-2x"></i>
</div>
</div>
</div>
</article>
<article class="col-md-4 isotopeItem video">
<div class="portfolio-item">
<img src="img/portfolio/img6.jpg" alt="" />
<div class="portfolio-desc align-center">
<div class="folio-info">
<h5>Portfolio name</h5>
<a class="fancybox" href="js/jwPlayer5/player.swf? file=http://localhost/plusbus/img/portfolio/videos/files/vid1.mp4" type="video/mp4" title="local video mp4"><i class="fa fa-expand fa-2x"></i></a>
</div>
</div>
</div>
</article>
</div>
</div>
</div>
</div>
</div>
</section>
Without code it is a bit of a guess. You are using isotope v1.56, not v2, you need to use Isoptope v1 imagesloaded info.
This is how you use it:
var $container = $('#container');
$container.imagesLoaded( function(){
$container.isotope({
// options...
});
});
For isotope v2, you would need to load imagesloaded.js separately since it is not included as it is in v1.5

Equally space 3 images in a row

I have three images on my site that are not equally spaced apart.
I would like to space these three items evenly across the page.
I have tried adding them into a container and applying different span classes to them but with no joy.
What is the best way to solve this without causing problems elsewhere? (e.g. on smaller devices).
<div class="col-1 row-5 sizex-3 sizey-3">
<a href="http://data.vicforeststrp.opendata.arcgis.com/datasets?q=HCV">
<img src="https://dl.dropboxusercontent.com/u/11426532/VicForest/HCV.png" class="img-responsive" />
</a>
</div>
<div class="col-5 row-5 sizex-3 sizey-3">
<a href="http://data.vicforeststrp.opendata.arcgis.com/datasets?q=TSZ">
<img src="https://dl.dropboxusercontent.com/u/11426532/VicForest/TSZ.png" class="img-responsive" />
</a>
</div>
<div class="col-8 row-5 sizex-3 sizey-3">
<a href="http://data.vicforeststrp.opendata.arcgis.com/datasets?q=TRP">
<img src="https://dl.dropboxusercontent.com/u/11426532/VicForest/TRP.png" class="img-responsive" />
</a>
</div>
The images are not equally spaced because you have provided inappropriate column classes for second and third div's.
Use col-4 for second(instead of col-5) and col-7 for third(instead of col-8) div.
<div class="col-1 row-5 sizex-3 sizey-3">
<a href="http://data.vicforeststrp.opendata.arcgis.com/datasets?q=HCV">
<img src="https://dl.dropboxusercontent.com/u/11426532/VicForest/HCV.png" class="img-responsive" />
</a>
</div>
<div class="col-4 row-5 sizex-3 sizey-3">
<a href="http://data.vicforeststrp.opendata.arcgis.com/datasets?q=TSZ">
<img src="https://dl.dropboxusercontent.com/u/11426532/VicForest/TSZ.png" class="img-responsive" />
</a>
</div>
<div class="col-7 row-5 sizex-3 sizey-3">
<a href="http://data.vicforeststrp.opendata.arcgis.com/datasets?q=TRP">
<img src="https://dl.dropboxusercontent.com/u/11426532/VicForest/TRP.png" class="img-responsive" />
</a>
</div>
You might aswell want to provide extra padding to each div for small resolutions.
Additionally, as haxxxton mentioned in comments, you should rather stick to standard bootstarp-3 classes for better usability.
Cheers!
You may like the reactive behaviour of a flex based solution like in this JSFiddle:
http://jsfiddle.net/6tknc03s/
.container {
display:flex;
justify-content:space-around;
flex-wrap:nowrap;
}
.container img {
width:100%;
}
I've tested this solution in Chrome, compatibility in FF and iOS requires vendor specific prefixes to be added to the CSS I've used.
Your best bet is to put them in col-*-4 (I chose sm, but whatever works best for you) and make sure to add class="img-responsive" to the img element, like so:
<div class="container">
<div class="row">
<div class="col-sm-4">
<img src="https://dl.dropboxusercontent.com/u/11426532/VicForest/HCV.png" class="img-responsive">
</div>
<div class="col-sm-4">
<img src="https://dl.dropboxusercontent.com/u/11426532/VicForest/TSZ.png" class="img-responsive">
</div>
<div class="col-sm-4">
<img src="https://dl.dropboxusercontent.com/u/11426532/VicForest/TRP.png" class="img-responsive">
</div>
</div>
</div>
Example: http://www.bootply.com/4lmpKkgENa
Try this out. it works i have edited your code with adding style to it.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
li {
display:inline;
list-style:none;
}
</style>
</head>
<body>
<div class="col-1 row-5 sizex-3 sizey-3">
<ul>
<li> <a href="http://data.vicforeststrp.opendata.arcgis.com/datasets?q=HCV">
<img src="https://dl.dropboxusercontent.com/u/11426532/VicForest/HCV.png" class="img-responsive" />
</a>
</li>
<li>
<a href="http://data.vicforeststrp.opendata.arcgis.com/datasets?q=TSZ">
<img src="https://dl.dropboxusercontent.com/u/11426532/VicForest/TSZ.png" class="img-responsive" />
</a></li>
<li>
<a href="http://data.vicforeststrp.opendata.arcgis.com/datasets?q=TRP">
<img src="https://dl.dropboxusercontent.com/u/11426532/VicForest/TRP.png" class="img-responsive" />
</a></li>
</ul>
</div>
</body>
</html>
Try this out:
<div class="row>
<div class-"container">
<div class="col-lg-4">
<img src="">
</div>
<div class="col-lg-4">
<img src="">
</div>
<div class="col-lg-4">
<img src="">
</div>
</div>
</div>

Using Bootstrap, insert a vertical line in the middle to separate 3 icons to the left, and 3 icons to the right, and still make it responsive

I'm hoping someone can help solve a problem I've had for the last 2 days. Unfortunately I can't post an image of that here as I'm new, and have no reputation points.
I have a layout with 2 sections.
1st Section
First row: Heading (centered)
Second row: 6 icons spread out across the width of the page, and their relevant 1-2 words description below each of the respective icons.
2nd Section
First row: 2 Headings (one centered on the left, the other centered on the right; separated by a white vertical line in the middle of the page)
Second row: 6 icons spread out across the width of the page as per the 1st section; but this time, the first 3 icons belong to the first Heading, and the last 3 icons belong to the second Heading.... with a vertical line in the middle, to separate out the 1st Heading & 3 icons on the left, and the 2nd Heading & last 3 icons on the right.
I could get the first line (heading, 6 icons and their relevant 1-2 words description) working in CSS. I used container-fluid, row, and the necessary col-sm-2 classes in Twitter-Bootstrap.
But how do I insert a border-right 100% white line (or any other suggestions will be very welcome), and squish it in between the 2nd row's two Headings and divide the icons into 3x3, at the same time?
The code below is what I used for the 1st section:
<div class="container-fluid">
<h5 class="text-center">HEADER 1</h5>
<ul class="row">
<li class="col-xs-4 col-sm-2">
<img src="img/1.png" alt="icon1">
<p class="text-center">2-word description</p>
</li>
<li class="col-xs-4 col-sm-2">
<img src="img/2.png" alt="icon2">
<p class="text-center">2-word description</p>
</li>
<li class="col-xs-4 col-sm-2">
<img src="img/3.png" alt="icon3">
<p class="text-center">2-word description</p>
</li>
<li class="col-xs-4 col-sm-2">
<img src="img/4.png" alt="icon4">
<p class="text-center">2-word description</p>
</li>
<li class="col-xs-4 col-sm-2">
<img src="img/5.png" alt="icon5">
<p class="text-center">2-word description</p>
</li>
<li class="col-xs-4 col-sm-2">
<img src="img/6.png" alt="icon6">
<p class="text-center">2-word description</p>
</li>
</ul>
<hr>
</div><!-- /.container-fluid -->
I need the next section to be somewhat like the 1st section, but have a vertical white line in the middle of the section, separating the 2nd header and 3 icons to the left, and the 3rd header and the last 3 icons to the right.
The code below is for the 2nd section:
<div class="container-fluid">
<ul class="row">
<li class="col-xs-12 col-sm-6">
<h5 class="text-center">HEADER 2</h5>
</li>
<li class="col-xs-12 col-sm-6">
<h5 class="text-center">HEADER 3</h5>
</li>
</ul>
</div><!-- /.container-fluid -->
<div class="container-fluid section2">
<div class="row">
<div class="left col-xs-12 col-sm-6">
<div class="container-fluid">
<ul class="row">
<li class="col-xs-4 col-sm-4">
<img src="img/7.png" alt="icon7">
<p class="text-center">2-word description</p>
</li>
<li class="col-xs-4 col-sm-4">
<img src="img/8.png" alt="icon8">
<p class="text-center">2-word description</p>
</li>
<li class="col-xs-4 col-sm-4">
<img src="img/9.png" alt="icon9">
<p class="text-center">2-word description</p>
</li>
</ul>
</div><!-- /.container-fluid -->
</div><!-- /.left -->
<div class="right col-xs-12 col-sm-6">
<div class="container-fluid">
<ul class="row">
<li class="col-xs-4 col-sm-4">
<img src="img/10.png" alt="icon10">
<p class="text-center">2-word description</p>
</li>
<li class="col-xs-4 col-sm-4">
<img src="img/11.png" alt="icon11">
<p class="text-center">2-word description</p>
</li>
<li class="col-xs-4 col-sm-4">
<img src="img/12.png" alt="icon12">
<p class="text-center">2-word description</p>
</li>
</ul>
</div><!-- /.container-fluid -->
</div><!-- /.right -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
Your invaluable help will be very much appreciated!
Thanks in advance!
new code for the 2nd section
<div class="section2">
<div class="left container-fluid">
<div class="row">
<h5 class="col-xs-12 col-sm-6 text-center">
HEADER2
</h5>
</div>
<ul class="row">
<li class="col-xs-4 col-sm-2">
<img src="img/7.png" alt="icon7">
<p class="text-center"2-word description</p>
</li>
<li class="col-xs-4 col-sm-2">
<img src="img/8.png" alt="icon8">
<p class="text-center">2-word description</p>
</li>
<li class="col-xs-4 col-sm-2">
<img src="img/9.png" alt="icon9">
<p class="text-center">2-word description</p>
</li>
</ul>
</div><!-- /.left .container-fluid -->
<div class="right container-fluid">
<div class="row">
<h5 class="col-xs-12 col-sm-6 text-center">
HEADER3
</h5>
</div>
<ul class="row">
<li class="col-xs-4 col-sm-2">
<img src="img/10.png" alt="icon10">
<p class="text-center">2-word description</p>
</li>
<li class="col-xs-4 col-sm-2">
<img src="img/11.png" alt="icon11">
<p class="text-center">2-word description</p>
</li>
<li class="col-xs-4 col-sm-2">
<img src="img/12.png" alt="icon12">
<p class="text-center">2-word description</p>
</li>
</ul>
</div><!-- /.right .container-fluid -->
</div><!-- /.section2 -->
NEW QUESTION
Hi... I have another small question...
I was working on the big screen and it wasn't obvious to me until now that I've started working on the #mediaqueries, and resizing the screen.
The icons and the the respective 2-word descriptions aren't exactly centered with each other. The 2-word descriptions are slightly to the right of the icons above.
I've tried using the bootstrap class .text-center on the element, it didn't work.
I've also tried giving the a class, and then using "margin: 0 auto" in CSS, and it also did not work.
Where have I gone wrong?
Thanks in advance.
first you should consider .section2 as a row, with two children header1 and header2. so add class="row" to this div, and apply class="col-xs-12 col-sm-6" to each header block.
then consider each header block as a single row, containing 3 images with description. do same action as before.
.container-fluid and .left .right are no longer necessary, as the parent .row and children's .col-* take care of these for you.
Update: sorry for ignoring your problem with the blank in the middle. it is caused by the default style of <ul>, and could be solved by adding ul { padding-left: 0;}.
see this fiddle for example.
In your second section make two main rows, these contain nested rows for your headings and respective icons. On the first row add a border-right.

Foundation Orbit Slider: Navigation Arrows referencing to index

When using Foundation: Orbit Slider, the navigation arrows are not taking me to the next slide but going back to the index page each time.
Markup `
<div class="row full-width" id="portfolio">
<div class="orbit-container">
<ul data-orbit class="example-orbit orbit-slides-container">
<li>
<img src="/Users/benhare/Desktop/foundation/portfolio/assets/slider2.jpg" alt="slide 1" />
<div class="orbit-caption">
Caption One.
</div>
</li>
<li class="active">
<img src="/Users/benhare/Desktop/foundation/portfolio/assets/slider2.jpg" />
<div class="orbit-caption">
Caption Two.
</div>
</li>
<li>
<img src="/Users/benhare/Desktop/foundation/portfolio/assets/slider3.jpg" alt="slide 3" />
<div class="orbit-caption">
Caption Three.
</div>
</li>
</ul>
<!-- Navigation Arrows -->
Prev <span></span>
Next <span></span>
<!-- Slide Numbers -->
<div class="orbit-slide-number">
<span>1</span> of <span>3</span>
</div>`
Try the following. Remove the following classes and rows (they are added by the JS automatically):
example-orbit
orbit-slides-container
active
everything after the <\ul>
Add closing tag to the <div class="orbit-container">
So your code will be this:
<div class="row full-width" id="portfolio">
<div class="orbit-container">
<ul data-orbit="">
<li>
<img src="/Users/benhare/Desktop/foundation/portfolio/assets/slider2.jpg" alt="slide 1" />
<div class="orbit-caption">
Caption One.
</div>
</li>
<li>
<img src="/Users/benhare/Desktop/foundation/portfolio/assets/slider2.jpg" />
<div class="orbit-caption">
Caption Two.
</div>
</li>
<li>
<img src="/Users/benhare/Desktop/foundation/portfolio/assets/slider3.jpg" alt="slide 3" />
<div class="orbit-caption">
Caption Three.
</div>
</li>
</ul>
</div>
</div>
It can be also a good idea to put the <div class="orbit-container"> into an additional div with class="large-12 columns", and to use a different image inside the first and second slide. I have no other ideas. It also took me a while to figure out how Orbit correctly works.