I am trying to align some elements with bootstrap but I have strange gap between them. May I ask you for some advice ?
here is the final picture of the layout structure.
Here is my code until this moment
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<section class="product-list">
<div class="container">
<div class="row">
<div class="col-md-3">
<div class="catalog">
<ul class="catalog-list">
<li>
<a href="#">
<img src="https://s23.postimg.org/mjrt9w557/example.jpg" width="260" height="260" title="someText" alt="someText">
</a>
</li>
</ul>
</div>
<!-- catalog -->
</div>
<div class="col-md-3">
<div class="catalog">
<ul class="catalog-list">
<li>
<a href="#">
<img src="https://s23.postimg.org/mjrt9w557/example.jpg" width="260" height="260" title="someText" alt="someText">
</a>
</li>
</ul>
</div>
<!-- catalog -->
</div>
<div class="col-md-6">
<div class="laptops">
<img src="https://s27.postimg.org/ottosbaw3/example2.jpg" width="548" height="545" title="someText" alt="someText">
</div>
</div>
</div>
<!-- row -->
<div class="row">
<div class="col-md-3">
<ul class="catalog-list">
<li>
<a href="#">
<img src="https://s23.postimg.org/mjrt9w557/example.jpg" width="260" height="260" title="someText" alt="someText">
</a>
</li>
</ul>
</div>
<div class="col-md-3">
<ul class="catalog-list">
<li>
<a href="#">
<img src="https://s23.postimg.org/mjrt9w557/example.jpg" width="260" height="260" title="someText" alt="someText">
</a>
</li>
</ul>
</div>
</div>
<!-- row -->
</div>
<!-- container -->
</section>
<!-- product-list -->
Assuming I understood you correctly, you had too much going on with your html. There is absolutely no need to wrap individual images into lists.
View in full-screen, I did not add small display classes.
.margin{margin-bottom: 25px;}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<section class="product-list">
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="row margin">
<div class="col-md-6">
<a href="#">
<img src="https://s23.postimg.org/mjrt9w557/example.jpg" width="260" height="260" title="someText" alt="someText">
</a>
</div>
<div class="col-md-6">
<a href="#">
<img src="https://s23.postimg.org/mjrt9w557/example.jpg" width="260" height="260" title="someText" alt="someText">
</a>
</div>
</div>
<div class="row">
<div class="col-md-6">
<a href="#">
<img src="https://s23.postimg.org/mjrt9w557/example.jpg" width="260" height="260" title="someText" alt="someText">
</a>
</div>
<div class="col-md-6">
<a href="#">
<img src="https://s23.postimg.org/mjrt9w557/example.jpg" width="260" height="260" title="someText" alt="someText">
</a>
</div>
</div>
</div>
<div class="col-md-6">
<div class="laptops">
<img src="https://s27.postimg.org/ottosbaw3/example2.jpg" width="548" height="545" title="someText" alt="someText">
</div>
</div>
</div>
</div>
<!-- container -->
</section>
<!-- product-list -->
If I understood your question correct you are wondering about the gap between the elements. Bootstrap applies padding between columns called gutter. You might have to adjust your gutter padding and margins if you do not want a gap between your columns.
http://getbootstrap.com/css/#grid-options
Use two col-md-6 and inside the first col-md-6 use 4 col-md-6 with specific height and your problem is solved.
Related
So im working on my portfolio for a class project and Im struggling with aligning my projects on a single row. Here is what I have / need help with....
<div class="container">
<div class="row">
<div class="col-md-4">
<a href="https://codepen.io/Designird/pen/JwLQoj" target="_blank" class="project project-title">
<img class="img-thumbnail" src="https://i.imgur.com/8TGwqfY.jpg" alt="project">
<div class="project-tile">Howard Stern Tribute Page</div>
</a>
</div>
</div>
<div class="col-md-4">
<a href="https://codepen.io/Designird/pen/Jwemdd" target="_blank" class="project project-title">
<img class="img-thumbnail" src="https://i.imgur.com/UtN8xFJ.jpg" alt="project">
<div class="project-tile">Product Landing Page</div>
</a>
</div>
</div>
<div class="col-md-4">
<a href="https://codepen.io/Designird/pen/xmoWLB" target="_blank" class="project project-title">
<img class="img-thumbnail" src="https://i.imgur.com/lY9IvVn.jpg" alt="project">
<div class="project-tile">UFO Sighting Survey</div>
</a>
</div>
</div>
</div>
</div>
First thing I noticed was that you have too many closing </div> tags. You should indent your code properly so it would be easy to notice that. I added img-fluid class to images so they are responsive and do not overflow the container.
Check out the snippet below in full screen.
I removed many elements and I left what was important to solve the problem. i hope it helps.
You should also check out Bootstrap documentation, you have everything there. LINK
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.css">
<div class="container">
<div class="row">
<div class="col-md-4">
<a href="#">
<img class="img-fluid" src="https://i.imgur.com/8TGwqfY.jpg" alt="">
<div>Howard Stern Tribute Page</div>
</a>
</div>
<div class="col-md-4">
<a href="#">
<img class="img-fluid" src="https://i.imgur.com/UtN8xFJ.jpg" alt="">
<div>Product Landing Page</div>
</a>
</div>
<div class="col-md-4">
<a href="#">
<img class="img-fluid" src="https://i.imgur.com/lY9IvVn.jpg" alt="">
<div>UFO Sighting Survey</div>
</a>
</div>
</div>
</div>
I am displaying in one row 6 columns as images in my website and I am using bootstrap 4 for diving colums, If I view the website in mobile means If the screen size(width) decreases I want to display images as 4 or 3 columns per row.
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.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>
<div class="container shadow">
<div class="row text-center">
<div class="col-sm-2">
<a href="category_details.php?id=Advertising Agencies">
<img src="https://pbs.twimg.com/profile_images/558329813782376448/H2cb-84q_400x400.jpeg" height="70" width="70">
<p class="text-para">image1</p>
</a>
</div>
<div class="col-sm-2">
<a href="category_details.php?id=Advocate">
<img src="https://pbs.twimg.com/profile_images/558329813782376448/H2cb-84q_400x400.jpeg" height="70" width="70">
<p class="text-para">image2</p>
</a>
</div>
<div class="col-sm-2">
<a href="category_details.php?id=Agriculture">
<img src="https://pbs.twimg.com/profile_images/558329813782376448/H2cb-84q_400x400.jpeg" height="70" width="70">
<p class="text-para">image3</p>
</a>
</div>
<div class="col-sm-2">
<a href="category_details.php?id=Architects">
<img src="https://pbs.twimg.com/profile_images/558329813782376448/H2cb-84q_400x400.jpeg" height="70" width="70">
<p class="text-para">image4</p>
</a>
</div>
<div class="col-sm-2">
<a href="category_details.php?id=Astrologers">
<img src="https://pbs.twimg.com/profile_images/558329813782376448/H2cb-84q_400x400.jpeg" height="70" width="70">
<p class="text-para">image5</p>
</a>
</div>
<div class="col-sm-2">
<a href="category_details.php?id=Automobiles">
<img src="https://pbs.twimg.com/profile_images/558329813782376448/H2cb-84q_400x400.jpeg" height="70" width="70">
<p class="text-para">image6</p>
</a>
</div>
</div>
Here I am want to display images 4 or 3 images per row if the screen width decreases but that showing single image per row in mobile view, Please if anyone knows Please suggest me on the correct way.
for small screen you use
<div class="col-4 col-sm-2">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.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>
<div class="container shadow">
<div class="row text-center">
<div class="col-4 col-sm-2 col-md-2">
<a href="category_details.php?id=Advertising Agencies">
<img src="https://pbs.twimg.com/profile_images/558329813782376448/H2cb-84q_400x400.jpeg" height="70" width="70">
<p class="text-para">image1</p>
</a>
</div>
<div class="col-4 col-sm-2 col-md-2">
<a href="category_details.php?id=Advocate">
<img src="https://pbs.twimg.com/profile_images/558329813782376448/H2cb-84q_400x400.jpeg" height="70" width="70">
<p class="text-para">image2</p>
</a>
</div>
<div class="col-4 col-sm-2 col-md-2">
<a href="category_details.php?id=Agriculture">
<img src="https://pbs.twimg.com/profile_images/558329813782376448/H2cb-84q_400x400.jpeg" height="70" width="70">
<p class="text-para">image3</p>
</a>
</div>
<div class="col-4 col-sm-2 col-md-2">
<a href="category_details.php?id=Architects">
<img src="https://pbs.twimg.com/profile_images/558329813782376448/H2cb-84q_400x400.jpeg" height="70" width="70">
<p class="text-para">image4</p>
</a>
</div>
<div class="col-4 col-sm-2 col-md-2">
<a href="category_details.php?id=Astrologers">
<img src="https://pbs.twimg.com/profile_images/558329813782376448/H2cb-84q_400x400.jpeg" height="70" width="70">
<p class="text-para">image5</p>
</a>
</div>
<div class="col-4 col-sm-2 col-md-2">
<a href="category_details.php?id=Automobiles">
<img src="https://pbs.twimg.com/profile_images/558329813782376448/H2cb-84q_400x400.jpeg" height="70" width="70">
<p class="text-para">image6</p>
</a>
</div>
</div>
This question already has answers here:
Can I have multiple background images using CSS?
(8 answers)
Closed 6 years ago.
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="">
<meta name="author" content="">
<title>Main Website</title>
<link href="css/main.css" rel="stylesheet">
</head>
<body>
<nav>
<div>
<div>
<ul>
<li><a class="active" href="index.html">Home</a></li>
<li>Mens Clothing</li>
<li>Womens Clothng</li>
<li>Boys Clothing</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div>
<div>
<div class="accordion">
<ul>
<li>
<div class="caption">Slide 1</div>
<a href="#">
<img src='Slider_Image1.jpg'/></a>
</li>
<li>
<div class="caption">Slide 2</div>
<a href="#">
<img src='Slider_Image2.jpg'/></a>
</li>
<li>
<div class="caption">Slide 3</div>
<a href="#">
<img src='Slider_Image3.jpg'/></a>
</li>
</ul>
</div>
</div>
<div>
<div class="centre , fade ,">
<div class="thumbnail">
<a href="Nike_Shoes1.html">
<img src="Image1.jpg" alt="">
</div>
</div>
<div class="centre , fade">
<div class="thumbnail">
<a href="Nike_Trainers.html">
<img src="Image2.jpg" alt="">
</div>
</div>
<div class="centre , fade">
<div class="thumbnail">
<img src="Image3.jpg" alt="">
</div>
</div>
<div class="centre , fade">
<div class="thumbnail">
<a href="new.html">
<img src="Mens_Clothing.jpg" alt="Mens Clothing">
</div>
</div>
<div class="centre , fade">
<div class="thumbnail">
<a href="women_clothing.html">
<img src="Womens_Clothing.jpg" alt="Womens Clothing">
</div>
</div>
<div class="centre , fade">
<div class="thumbnail">
<a href="boys_clothing.html">
<img src="Boys_Clothing.jpg" alt="Boys Clothing">
</div>
</div>
<div class="centre , fade">
<div class="thumbnail">
<img src="Converse_clothing.jpg" alt="Converse Clothing">
</div>
</div>
<div class="centre , fade">
<div class="thumbnail">
<img src="Adidas_clothing.jpg" alt="Adidas Clothing">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<!-- Footer -->
<footer>
</footer>
</div>
Here is the code for a website I am developing and I am trying to add images for the background. What I am looking to do is add 2 images on either side of the webpage, I am not sure on how to go about this also while trying to add an image as my background I see a white area the image is not set as the background, any help is appreciated.
Your best bet would be to merge the two images into one image using an image editor and then setting the merged image as your background.
Just open paint glue the 2 images together and use it as background.
I am building a webpage using Twitter Bootstrap. I have a .box class where I put my content. The problem is, that on one of the pages where I have 2 boxes, one of them doesn't have the proper width of the container. The first box is wider than the second one and It doesn't look nice. I think that there will be a problem with an unclosed div or something like that, but I wasn't able to figure that out.
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>MG STAV - Reference</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/business-casual.css" rel="stylesheet">
<link href="css/bootstrap-lightbox.css" rel="stylesheet">
<!-- Fonts -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Josefin+Slab:100,300,400,600,700,100italic,300italic,400italic,600italic,700italic" rel="stylesheet" type="text/css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container text-center">
<img class="img-responsive brand-img" src="img/logo.png" alt="">
</div>
<!-- Navigation -->
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- navbar-brand is hidden on larger screens, but visible when the menu is collapsed -->
<a class="navbar-brand" id="link" href="index.html">MG STAV stavební, spol. s r.o</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
<a id="link" href="index.html">Domů</a>
</li>
<li>
<a id="link" href="about.html">O společnosti</a>
</li>
<li>
<a id="link" href="reference.html">Reference</a>
</li>
<li>
<a id="link" href="contact.html">Kontakt</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<div class="container">
<div class="row">
<div class="box">
<div class="col-lg-12">
<hr>
<h2 class="intro-text text-center">Naše
<strong>reference</strong>
</h2>
<hr>
</div>
<div class="col-md-5">
<img class="img-responsive img-border-left thumbnail" src="img/banner.jpg" alt="">
</div>
<div class="col-md-7">
<ul class="list-unordered list-reference">
<li>Stavba budovy sociálního zařízení rekreačního areálu Kristýna, Hrádek nad Nisou</li>
<li>Rekonstrukce bytového domu, Horní Počernice</li>
<li>Stavba RD, Stráž pod Ralskem</li>
<li>Stavba RD, Vratislavice nad Nisou</li>
<li>Rekonstrukce RD, Proseč nad Nisou</li>
<li>Rekonstrukce RD, Rychnov u Jablonce nad Nisou</li>
<li>Oprava výrobní haly, Jablonné v Podještědí</li>
<li>Rekontrukce bytového domu, Česká Lípa</li>
</ul>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="box">
<div class="row">
<div class="col-sm-12 text-center">
<hr>
<div class="galerie">
<ul class="intro-text text-center">
<li class="active">Rekonstrukce</li>
<li>Zemní práce</li>
<li>Rodinné domy</li>
</ul>
</div>
<hr>
</div>
</div>
<div class="tab-content">
<div class="tab-pane odstavec fade in active" id="rekonstrukce">
<div class="row">
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rekonstrukce/pic1.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rekonstrukce/pic2.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rekonstrukce/pic3.jpg" alt="">
</a>
</div>
</div>
<div class="row">
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rekonstrukce/pic4.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rekonstrukce/pic5.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rekonstrukce/pic6.jpg" alt="">
</a>
</div>
</div>
<div class="row">
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rekonstrukce/pic7.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rekonstrukce/pic1.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rekonstrukce/pic9.jpg" alt="">
</a>
</div>
</div>
<div class="row">
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rekonstrukce/pic10.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rekonstrukce/pic11.jpg" alt="">
</a>
</div>
</div>
</div>
<div class="tab-pane odstavec fade" id="rodinne_domy">
<div class="row">
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rodinne_domy/pic1.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rodinne_domy/pic2.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rodinne_domy/pic3.jpg" alt="">
</a>
</div>
</div>
<div class="row">
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rodinne_domy/pic4.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rodinne_domy/pic5.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rodinne_domy/pic6.jpg" alt="">
</a>
</div>
</div>
<div class="row">
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rodinne_domy/pic7.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rodinne_domy/pic8.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rodinne_domy/pic9.jpg" alt="">
</a>
</div>
</div>
<div class="row">
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rodinne_domy/pic10.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rodinne_domy/pic11.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rodinne_domy/pic12.jpg" alt="">
</a>
</div>
</div>
<div class="row">
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rodinne_domy/pic13.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/rodinne_domy/pic14.jpg" alt="">
</a>
</div>
</div>
</div>
<div class="tab-pane odstavec fade" id="zemni_prace">
<div class="row">
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/zemni_prace/pic1.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/zemni_prace/pic2.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/zemni_prace/pic3.jpg" alt="">
</a>
</div>
</div>
<div class="row">
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/zemni_prace/pic4.jpg" alt="">
</a>
</div>
<div class="col-sm-4 text-center">
<a href="#" class="thumbnail" data-toggle="modal" data-target="#lightbox">
<img class="img-responsive" src="img/zemni_prace/pic5.jpg" alt="">
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="lightbox" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog">
<button type="button" class="close hidden" data-dismiss="modal" aria-hidden="true">×</button>
<div class="modal-content">
<div class="modal-body">
<img src="" alt="" />
</div>
</div>
</div>
</div>
<footer>
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<p>Copyright © www.mgstav.cz</p>
</div>
</div>
</div>
</footer>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-lightbox.js"></script>
</body>
</html>
Here is the webpage, so you could look at what it does: http://www.mgstav.cz/reference.html
I noticed that the footer acts differently than on the other subpages too. I think that the container doesn't apply on the whole content, but I don't know why.
Your "row" and "box" classes are reversed in this section of your code:
<div class="box"><!-- should be "row" -->
<div class="row"><!-- should be "box" -->
<div class="col-sm-12 text-center">
<hr>
<div class="galerie">
<ul class="intro-text text-center">
<li class="active">Rekonstrukce</li>
<li>Zemní práce</li>
<li>Rodinné domy</li>
</ul>
</div>
<hr>
</div>
</div>
And the padding appearing below your home page footer (which is not applied on your sub pages) is coming from a rule in your 'bootstrap-lightbox.css' file:
body {
padding: 30px 0px; /* applies top and bottom padding of 30px */
overflow-y: auto !important;
}
UPDATE: Padding Issue Fix When Modal Window Opens
The easiest way to fix this issue is to override the inline styles I mentioned in the comments below. Add the following style rule to your 'business-casual.css' file:
body.modal-open,
.modal-open .modal {
padding-right: 0 !important;
}
Maybe I'm over thinking this.. How can I have an odd number of thumbnails using Bootstrap's grid. I have 7 thumbnail images at the bottom. I'd like to space them out of course using the grid. Maybe this isn't possible and should just use regular CSS?
Here's what I tried:
<div class="row-fluid">
<div class="span12">
<ul class="thumbnails">
<li class="span1">
<div class="thumbnail">
<img src="img/diningroom/1.jpg" alt="">
</div>
</li>
<li class="span2">
<div class="thumbnail">
<img src="img/diningroom/2.jpg" alt="">
</div>
</li>
<li class="span2">
<div class="thumbnail">
<img src="img/diningroom/3.jpg" alt="">
</div>
</li>
<li class="span2">
<div class="thumbnail">
<img src="img/diningroom/4.jpg" alt="">
</div>
</li>
<li class="span2">
<div class="thumbnail">
<img src="img/diningroom/5.jpg" alt="">
</div>
</li>
<li class="span2">
<div class="thumbnail">
<img src="img/diningroom/6.jpg" alt="">
</div>
</li>
<li class="span1">
<div class="thumbnail">
<img src="img/diningroom/6.jpg" alt="">
</div>
</li>
</ul>
</div>
</div>
You can customize bootstrap columns here (see #gridColumns).