Please take look at my portfolio site
the toggle hamburger button for navigation for smaller screen sizes doesn't work i.e nothing happens and the links don't show up when I click on it.
the images and boxes for the portfolio apps showcased becomes too small for smaller screen sizes even though I used col-sm-12, dunno why this is happening?
I have noticed that there is a horizontal bar too for small screen sizes, which shouldn't be there. It seems that it's the portfolio heading and the contact me heading causing this. could you tell me how to fix this?
<!--Navbar Begins -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- navbar header begins -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Faraz Ahmed</a>
</div>
<!-- navbar header ends -->
<!-- div collapse begins -->
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li>About
</li>
<li>Portfolio
</li>
<li>Contact
</li>
</ul>
</div>
<!-- div collapse ends -->
</div>
<!-- container-fluid ends -->
</nav>
<!--Navbar ends -->
<div id="aboutme" class="about container-fluid">
<div class="row">
<div class="col-lg-12 col-md-8 col-sm-6">
<img class="img-responsive img-circle" src="http://res.cloudinary.com/whizzy/image/upload/v1454699647/faraz_qwdqrx.jpg">
<h1>Faraz Ahmed</h1>
<hr><i class="fa fa-star"></i>
<hr>
<p>I am a self taught web developer who has learnt html,css, Javascript,Jquery and bootstrap too. I keep building websites and other apps to practice what I have learnt. The psd to html site below and the sites with carousel and overlay are all responsive.
Go ahead and take a look at them in your mobile and see how they adjust to your screen size.</p>
</div>
</div>
</div>
<div id="portfolioz" class="portfolio container-fluid">
<div class="row">
<div class="col-md-12 col-md-10 col-sm-12">
<h1>Portfolio</h1>
<hr><i class="fa fa-star"></i>
<hr>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/YwXYbM">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/v1454696279/random-quotes_wkbzgo.jpg">
</a>
<p>This is the random quotes generator</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/PZzgvR">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1454696085/pomodoro_rnl9n4.jpg">
</a>
<p>This is the pomodoro timer</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/XXjEYE">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1454695469/javascript-calculator_zksddu.jpg">
</a>
<p>This is the javascript calculator</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/GZWNOX">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1459189426/carousel-experiment_sd0wev.jpg">
</a>
<p>Carousel Experiment with in psd to html site</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/eJqPjy">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1459189426/portfolio-site_gmac46.jpg">
</a>
<p>My Portfolio site showcasing projects & experiments</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/ZQRvKL">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1459189426/overlay-experiment_eocbsr.jpg">
</a>
<p>Experimenting with overlay and pop-up boxes</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/YwoGMB">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1462367863/weatherapp_zvihox.jpg">
</a>
<p>My Weather app</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/BKGXNG">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1462367830/wikiview_slscex.jpg">
</a>
<p>Wikipedia Viewer</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/qZLZEy">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1467313840/twitch-tv_vhqntl.jpg">
</a>
<p>Twitch Tv Streamer</p>
</div>
</div>
</div>
<div id="contactme" class="contact container-fluid">
<div class="row">
<div class="col-md-12">
<h2> Connect with me:</h2>
<a href="http://www.twitter.com/faraz">
<button id="btn5" class="btn btn-default btn-lg"><i class="fa fa-twitter fa-fw"></i>Twitter</button>
</a>
<a href="http://www.github.com/silentarrowz">
<button id="btn6" class="btn btn-default btn-lg"><i class="fa fa-github fa-fw"></i>Github</button>
</a>
<a href="https://www.linkedin.com/profile/view?id=AAMAAAOtZrQByiBQ7mnkxFa8BDodzVKYzsI7T3Y&trk=hp-identity-name">
<button id="btn7" class="btn btn-default btn-lg"><i class="fa fa-linkedin fa-fw"></i>Linkedin</button>
</a>
<a href="http://www.freecodecamp.com/silentarrowz">
<button id="btn8" class="btn btn-default btn-lg"><i class="fa fa-fire fa-fw"></i>freeCodeCamp</button>
</a>
</div>
</div>
</div>
<div class="footer">
<p>Copyright Reserved By Faraz Ahmed # 2016</p>
</div>
Problem
you are missing bootstrap.js
Explanation
Boostrap navbar requires JavaScript plugin to work, and you are missing it. You can see in Boostrap Docs
Requires JavaScript plugin
If JavaScript is disabled and the viewport is narrow enough that the
navbar collapses, it will be impossible to expand the navbar and view
the content within the .navbar-collapse.
The responsive navbar requires the collapse plugin to be included in
your version of Bootstrap.
Working Snippet
body{
font-size:14px;
}
.container-fluid{
max-width:1200px;
}
.hoverme{
height:400px;
margin-bottom:20px;
overflow :hidden;
max-width:340px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<!--Navbar Begins -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- navbar header begins -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Faraz Ahmed</a>
</div> <!-- navbar header ends -->
<!-- div collapse begins -->
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li>About</li>
<li>Portfolio</li>
<li>Contact</li>
</ul>
</div><!-- div collapse ends -->
</div><!-- container-fluid ends -->
</nav>
<!--Navbar ends -->
<div id="aboutme" class="about container-fluid">
<div class="row">
<div class="col-lg-12 col-md-8 col-sm-6">
<img class="img-responsive img-circle" src="http://res.cloudinary.com/whizzy/image/upload/v1454699647/faraz_qwdqrx.jpg">
<h1>Faraz Ahmed</h1>
<hr><i class="fa fa-star"></i><hr>
<p>I am a self taught web developer who has learnt html,css, Javascript,Jquery and bootstrap too. I keep building websites and other apps to practice what I have learnt. The psd to html site below and the sites with carousel and overlay are all responsive. Go ahead and take a look at them in your mobile and see how they adjust to your screen size.</p>
</div>
</div>
</div>
<div id="portfolioz" class="portfolio container-fluid">
<div class="row">
<div class="col-md-12 col-md-10 col-sm-12">
<h1>Portfolio</h1>
<hr><i class="fa fa-star"></i><hr>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/YwXYbM"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/v1454696279/random-quotes_wkbzgo.jpg"></a>
<p> This is the random quotes generator</p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/PZzgvR"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1454696085/pomodoro_rnl9n4.jpg"></a>
<p> This is the pomodoro timer</p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"> <a class="thumbnail" href="http://codepen.io/silentarrowz/full/XXjEYE"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1454695469/javascript-calculator_zksddu.jpg"></a>
<p> This is the javascript calculator</p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/GZWNOX"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1459189426/carousel-experiment_sd0wev.jpg"></a>
<p>Carousel Experiment with in psd to html site</p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/eJqPjy"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1459189426/portfolio-site_gmac46.jpg"></a>
<p>My Portfolio site showcasing projects & experiments</p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/ZQRvKL"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1459189426/overlay-experiment_eocbsr.jpg"></a>
<p>Experimenting with overlay and pop-up boxes</p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/YwoGMB"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1462367863/weatherapp_zvihox.jpg"></a>
<p>My Weather app </p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/BKGXNG"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1462367830/wikiview_slscex.jpg"></a>
<p>Wikipedia Viewer</p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/qZLZEy"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1467313840/twitch-tv_vhqntl.jpg"></a>
<p>Twitch Tv Streamer</p></div>
</div>
</div>
<div id="contactme" class="contact container-fluid">
<div class="row">
<div class="col-md-12">
<h2> Connect with me:</h2>
<a href="http://www.twitter.com/faraz">
<button id="btn5" class="btn btn-default btn-lg"><i class="fa fa-twitter fa-fw"></i>Twitter</button>
</a>
<a href="http://www.github.com/silentarrowz">
<button id="btn6" class="btn btn-default btn-lg"><i class="fa fa-github fa-fw"></i>Github</button>
</a>
<a href="https://www.linkedin.com/profile/view?id=AAMAAAOtZrQByiBQ7mnkxFa8BDodzVKYzsI7T3Y&trk=hp-identity-name">
<button id="btn7" class="btn btn-default btn-lg"><i class="fa fa-linkedin fa-fw"></i>Linkedin</button>
</a>
<a href="http://www.freecodecamp.com/silentarrowz">
<button id="btn8" class="btn btn-default btn-lg"><i class="fa fa-fire fa-fw"></i>freeCodeCamp</button>
</a>
</div>
</div>
</div>
<div class="footer">
<p>Copyright Reserved By Faraz Ahmed # 2016</p>
</div
Related
I am learning to create a website by downloading and editing contents.
I have created a section in the home page which shows the images of all stores of a shop. I need to display 3 stores image on the home page and add a View all button in the right bottom side of the section.
I have tried many ways but can't get it done in a good way.
Below is the HTML Code :
<!-- OUR STORES Section -->
<section id="stores" class="bg-light-gray">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading">Our Stores</h2>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-6 portfolio-item">
<a href="#storeModal1" class="store-link" data-toggle="modal">
<div class="store-hover">
<div class="store-hover-content">
<i class="fa fa-plus fa-3x"></i>
</div>
</div>
<img src="img/store/store01.png" class="img-responsive" alt="">
</a>
<div class="store-caption">
<h4>Store 01</h4>
<p class="text-muted">Location 01</p>
</div>
</div>
<div class="col-md-4 col-sm-6 store-item">
<a href="#storeModal2" class="store-link" data-toggle="modal">
<div class="store-hover">
<div class="store-hover-content">
<i class="fa fa-plus fa-3x"></i>
</div>
</div>
<img src="img/store/store02.png" class="img-responsive" alt="">
</a>
<div class="store-caption">
<h4>Store 02</h4>
<p class="text-muted">Location 02</p>
</div>
</div>
</div>
</div>
</section>
Why not just adding a new row, text aligned to right with the button ?
edit: See other response, this one only tell how to add the HTML button, not the javascript of it.
<!-- OUR STORES Section -->
<section id="stores" class="bg-light-gray">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading">Our Stores</h2>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-6 portfolio-item">
<a href="#storeModal1" class="store-link" data-toggle="modal">
<div class="store-hover">
<div class="store-hover-content">
<i class="fa fa-plus fa-3x"></i>
</div>
</div>
<img src="img/store/store01.png" class="img-responsive" alt="">
</a>
<div class="store-caption">
<h4>Store 01</h4>
<p class="text-muted">Location 01</p>
</div>
</div>
<div class="col-md-4 col-sm-6 store-item">
<a href="#storeModal2" class="store-link" data-toggle="modal">
<div class="store-hover">
<div class="store-hover-content">
<i class="fa fa-plus fa-3x"></i>
</div>
</div>
<img src="img/store/store02.png" class="img-responsive" alt="">
</a>
<div class="store-caption">
<h4>Store 02</h4>
<p class="text-muted">Location 02</p>
</div>
</div>
</div>
<!-- HERE -->
<div class="row">
<div class="col-md-12 text-right">
<button class="btn btn-primary">View All</button>
</div>
</div>
</div>
</section>
If you don't want to load them asynchronously (resp. you have them in HTML file already) you can wrap them into div, which is set as a hidden in css display:none
Then you need Javascript and create event which handles DOM interaction on click.
I made a little sample for you with CSS and jQuery (Javascript Framework):
https://jsfiddle.net/ta53jfwo/
I hope it helps!
I'm pretty new with bootstrap and css. Firstly, I would like to know if the code I wrote is correct. Working with more containers is fine? I use fluid containers for header and footer (width 100% vw), and a standard container for the contents.
Secondly, I m not sure what is the best way to code my footer. I need it on the bottom of the page, but not fixed with absolute position (I dont want it fixed in the browser window).
I tried different solutions without succeding. Shall I nest all my containers in another one?
Thank you so much, and sorry if I didn't explain perfectly or I missed anything.
<div class="container">
<div class="row">
<div clas="col-xs-12">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navbar-brand no_margins">
<img src="images/logo.png" alt="logo">
</div>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active">
<a href="#">
About
</a>
</li>
<li>
<a href="#">
Works
</a>
</li>
<li>
<a href="#">
News
</a>
</li>
<li>
<a href="#">
Contacts
</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
</div>
<!-- close container navbar-->
<!-- header -->
<div class="container">
<div class="row">
<header class="col-xs-12 static_header">
<div class="row">
<div class="col-xs-12 col-sm-3 hidden-xs logo_header">
<img src="images/logo_header.png" />
</div>
<div class="col-xs-12 col-sm-9 title_header">
<h1>
My Title
</h1>
</div>
</div>
</header>
</div>
</div>
<!-- end header -->
<!-- content -->
<div class="container">
<div>
<div class="row">
<div class="col-xs-12" id="content_box">
<h2>
About
</h2>
<p>
my text
</p>
</div>
</div>
</div>
</div>
<!-- end content -->
<footer class="container-fluid">
<div class="row">
<div class="col-xs-12">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-4 contact_footer">
info#site.com<br>
+1 234567890
</div>
<div id="footer_social_bar" class="col-xs-12 col-sm-4">
<img src="images/fb.png"/>
<img src="images/linkedin.png"/>
<img src="images/twitter.png"/>
</div>
<div class="col-xs-12 col-sm-4 copyright">
© 2017, company
</div>
</div>
</div>
</div>
</div>
</footer>
If you're concerned about viewers using a screen that is far bigger than the content you have in your website, you can use the following css to make sure that the site is at least as big as their browser.
html{
height:100%;
}
body{
min-height:100%;
background-color:#0C0;
}
<p>I only have a small amount of content. But the body background-color is as big as the screen</p>
I have problems with footer in on website. It's a bit strange because I have never had problems with footers.
I want to place the footer exactly like the menu, I'm using Bootstrap so I'm using columns but it's not working. I don't know why the space between elements on footer is different (all elements has the same number of columns) and also it doesn't start where the menu starts.
This is the code:
HTML:
<div class="container"> <!--el container creo que hacía que los círculos se viesen más peques-->
<nav class="navbar navbar-default navbar-fixed-top menupropio">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<img class="logo_menu img-responsive" src="images/logo_peque.png" alt="logo home"/>
</div>
<div id="navbar" class="navbar-collapse collapse">
<div class="secciones">
<ul class="nav navbar-nav" style="border-bottom:0px">
<!--<li class="active">Home</li>-->
<li>Kontakt</li>
<li>Valik üle 20 aasta jooksul tehtud töödest</li> <!--todo los trabajos juntos -->
<li>Logod</li> <!--en esta pagina van todos los logos-->
<li>Trükised ja muu</li> <!--todo lo que no sean logos-->
</ul>
</div>
</div><!--/.nav-collapse -->
</nav>
<!--work designs starts-->
<section class="row center-block text-center">
<div class="col-xs-6 col-sm-6 col-md-3">
<div class="rings">
<a href="res_publica.html"><img class="img-responsive img-circle" src="images/res_publica_valimiskampaania_kujundus_thumbnail.jpg" alt="Res Publica valimiskampaania"/>
<span>Res Publica valimiskampaania</span>
</a>
</div>
</div>
<div class="col-xs-6 col-sm-6 col-md-3">
<div class="rings">
<a href="ajakiri_lofo.html"><img src="images/lofo_loodusfotoajakiri.jpg" class="img-responsive img-circle" alt="Ajakiri LoFo"/>
<span>Ajakiri LoFo</span>
</a>
</div>
</div>
<div class="col-xs-6 col-sm-6 col-md-3">
<div class="rings">
<a href="kataloogid.html"><img src="images/kataloogid.jpg" class="img-responsive img-circle" alt="Kataloogid"/>
<span>Kataloogid</span>
</a>
</div>
</div>
<div class="col-xs-6 col-sm-6 col-md-3">
<div class="rings">
<a href="hansab_logo.html"><img src="images/hansab_logo.jpg" class="img-responsive img-circle" alt="Hansab logo"/>
<span>Hansab logo</span>
</a>
</div>
</div>
<div class="col-xs-6 col-sm-6 col-md-3">
<div class="rings">
<a href="hotelli_sildid.html"><img src="images/hotelli_do_not disturb_silt.jpg" class="img-responsive img-circle" alt="Hotelli sildid"/>
<span>Hotelli sildid</span>
</a>
</div>
</div>
<div class="col-xs-6 col-sm-6 col-md-3">
<div class="rings">
<a href="mappkaaned.html"><img src="images/mappkaaned.jpg" class="img-responsive img-circle" alt="Mappkaaned"/>
<span>Mappkaaned</span>
</a>
</div>
</div>
<div class="col-xs-6 col-sm-6 col-md-3">
<div class="rings">
<a href="seinakalender.html"><img src="images/seinakalender.jpg" class="img-responsive img-circle" alt="Seinakalender"/>
<span>Seinakalender</span>
</a>
</div>
</div>
<div class="col-xs-6 col-sm-6 col-md-3">
<div class="rings">
<a href="ajakiri_psyk.fi.html"><img src="images/ajakiri_psyk_fi.jpg" class="img-responsive img-circle" alt="Ajakiri Psyk.fi"/>
<span>Ajakiri Psyk.fi</span>
</a>
</div>
</div>
</section>
</div> <!--container-->
<footer>
<div class="footer">
<div>
<div class="col-md-offset-4 col-sm-5 col-md-1 col-lg-1">
<p>Kiige RB OÜ</p>
</div>
<div class="col-sm-5 col-md-1 col-lg-1">
<a target="_blank" href="mailto:kiige#kiige.ee"><p>kiige#kiige.ee</p></a>
</div>
<div class="col-sm-5 col-md-1 col-lg-1">
<p>+(372) 50 20 506</p>
</div>
<div class="col-sm-5 col-md-1 col-lg-1">
<p>Tuleme hea meelega teile külla!</p>
</div>
</div>
</div>
</footer>
and CSS:
footer{
margin-top:0px;
color: black;
text-align: center;
font-size: 0.9em;
}
If you want to take a look at the website, this is the provisional link: http://clients.sabrinacouto.com/kiige/
Does anyone knows how to solve it?
Thanks a lot!
All your sections seem to use "row"
<section class="row center-block text-centre">
However, your footer doesn't have a row surrounding your columns to negate the spacing it adds. Col always adds an additional spacing to both sides. The row is there to negate that spacing if you have multiple cols.
Edit in your html as like this may it helps you
<footer>
<div class="footer">
<div class="container">
<div class="row">
<div class="col-sm-6 col-md-3 col-lg-3">
<p>Kiige RB OÜ</p>
</div>
<div class="col-sm-6 col-md-3 col-lg-3">
<a target="_blank" href="mailto:kiige#kiige.ee"><p>kiige#kiige.ee</p></a>
</div>
<div class="col-sm-6 col-md-3 col-lg-3">
<p>+(372) 50 20 506</p>
</div>
<div class="col-sm-6 col-md-3 col-lg-3">
<p>Tuleme hea meelega teile külla!</p>
</div>
</div>
</div>
</div>
</footer>
I am trying to align the my icon's text to be on the same level. However, they are distorted when the window is resized bigger as shown in the fiddle. How can I make them to be beside each other?
Here's my fiddle:
https://jsfiddle.net/whywymam/72qp7c6L/
My HTML:
<div id="btnTopInline">
<ul class= "nav navbar-nav navbar-right hidden-xs">
<div class="col-sm-3 col-md-3 col-lg-3">
<li>
<div class="indivColl">
<a href="signupLogin.php">
<img src="https://i.stack.imgur.com/pBLqM.png" class="indi">
<p class="indit">Job Seeker</p>
</a>
</div>
</li>
</div>
<div class="col-sm-3 col-md-3 col-lg-3">
<li>
<div class="empColl">
<a href="signupLoginEmp.php">
<img src="https://i.stack.imgur.com/Dbaoj.png" class="emp">
<p class="empt">Employer</p>
</a>
</div>
</li>
</div>
<div class="clearfix visible-md-block"></div>
<div class="clearfix visible-sm-block"></div>
<div class="clearfix visible-lg-block"></div>
</ul>
</div><!-- end btnTopInline -->
<div class="col-xs-2 col-xs-push-6 padBtnRight">
<button type="button" class="btn btn-login visible-xs">
<a href="signupLogin.php">
Job Seeker<br>Log In
</a>
</button>
</div>
<div class="col-xs-2 col-xs-push-7">
<button type="button" class="btn btn-login visible-xs">
<a href="signupLoginEmp.php">
Employer<br>Log In
</a>
</button>
</div>
<div class="clearfix visible-xs-block"></div>
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;
}