Bootstrap carousel indicators not clickable - html

I can't seem to figure out why the carousel indicators are not clickable like on the Boostrap 4 carousel examples I have seen. From what I have seen this functionality should work without any extra code but mine doesn't. I can't see what I've done wrong as all I did was copy the carousel from the Boostrap documents, and then add some content. I would like to have clickable text as the indicators for each slide. What have I done wrong?
.carousel-indicators {
background-color: blue;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet" />
<section class="drinks_menu">
<div class="container">
<div id="drinks_carousel" class="slide" data-ride="carousel">
<ul class="carousel-indicators">
<li data-target="#drinks_carousel" data-slide-to="0" class="active">HOT DRINKS</li>
<li data-target="#drinks_carousel" data-slide-to="1">SOFT DRINKS</li>
<li data-target="#drinks_carousel" data-slide-to="2">BEER</li>
<li data-target="#drinks_carousel" data-slide-to="3">WINE</li>
<li data-target="#drinks_carousel" data-slide-to="4">SPIRITS</li>
</ul>
<div class="carousel-inner">
<div class="carousel-item active">
<div class="row">
<div class="col-12">
<h2 class="heading">HOT DRINKS</h2>
</div>
</div>
<div class="row">
<ul class="menu_list">
<li>Espresso <span>£1.80</span></li>
<li>Espresso macchiato <span>£1.90</span></li>
<li>Tea - peppermint / green / camomile / earl grey / yorkshire <span>£1.90</span></li>
<li>Americano <span>£2.00</span></li>
<li>Caffe latte <span>£2.40</span></li>
</ul>
<ul class="menu_list">
<li>Flat white <span>£2.60</span></li>
<li>Cappucino <span>£2.40</span></li>
<li>Mocha <span>£2.60</span></li>
<li>Hot chocolate <span>£2.40</span></li>
</ul>
</div>
</div>
<div class="carousel-item">
<div class="row">
<div class="col-12">
<h2 class="heading">SOFT DRINKS</h2>
</div>
</div>
<div class="row">
<ul class="menu_list">
<li>San pellegrino cans – blood orange / limonata/ orange pomegranate<span>£1.80</span></li>
<li>Harrogate spring still water <span>£1.40</span></li>
<li>Smeraldina sparkling water<span>£2.00</span></li>
</ul>
<ul class="menu_list">
<li>Fresh juice – orange / apple <span>£1.80</span></li>
<li>Coca cola / sprite <span>£1.50</span></li>
</ul>
</div>
</div>
<div class="carousel-item">
<div class="row">
<div class="col-12">
<h2 class="heading">BEER</h2>
</div>
</div>
<div class="row">
<ul class="menu_list full">
<li>Draught – birra moretti <span>½ pint £2.20</span>span> <span>Pint £4.40</span></li>
<li>Speciality birra moretti<span>toscana £4.80</span> <span>siciliana £4.80</span></li>
</ul>
</div>
</div>
<div class="carousel-item">
<div class="row">
<div class="col-12">
<h2 class="heading">WINE</h2>
</div>
</div>
<div class="row">
<ul class="menu_list">
<li class="section_title">House</li>
<li>Tenuta san marco white / red<span>125ML £2.75</span> <span>250ML £5.50</span> <span>500ML carafe £11.00</span></li>
<li class="section_title">Red</li>
<li>Malbec- El Finatello; Chile <span>250ML £6.50</span> <span>Bottle £19.50</span></li>
<li>Chianti D.O.C. - Vernaiolo; Italy <span>250ML £7.00</span> <span>Bottle £21.00</span></li>
</ul>
<ul class="menu_list">
<li class="section_title">White</li>
<li>Gavi Di Gavi – conti speroni; Italy <span>250ML £7.00</span> <span>Bottle £21.00</span></li>
<li>Sauvignon Blanc- Clifford Quay; New Zealand <span>250ML £7.50</span> <span>Bottle £22.00</span></li>
<li class="section_title">Rose</li>
<li>Pinot Grigio Rose – Villa Serena; Italy <span>250ML £6.50</span> <span>Bottle £19.50</span> </li>
</ul>
<ul class="menu_list">
<li class="section_title">Prosecco</li>
<li>Miol D.O.C. Treviso – Italy <span>125ML £6.00</span> <span>Bottle £24.00</span></li>
</ul>
</div>
</div>
<div class="carousel-item">
<div class="row">
<div class="col-12">
<h2 class="heading">SPIRITS</h2>
</div>
</div>
<div class="row">
<ul class="menu_list">
<li>Aperol Spritz <span>£6.90</span></li>
<li>Grappa Invecchiata<span>£3.50</span></li>
</ul>
<ul class="menu_list">
<li>Limoncello <span>£3.50</span></li>
<li>Malfy Gin & Fever Tree Tonic – Sicilian bloody orange / Sicilian pink grapefruit / Limone / Originale <span>£6.50</span></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>

What you are missing is this <div id="drinks_carousel" class="carousel slide" data-ride="carousel">
the carousel class is missing from the div. check this out.
.carousel-indicators {
background-color: blue;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet" />
<section class="drinks_menu">
<div class="container">
<div id="drinks_carousel" class="carousel slide" data-ride="carousel">
<ul class="carousel-indicators">
<li data-target="#drinks_carousel" data-slide-to="0" class="active">HOT DRINKS</li>
<li data-target="#drinks_carousel" data-slide-to="1">SOFT DRINKS</li>
<li data-target="#drinks_carousel" data-slide-to="2">BEER</li>
<li data-target="#drinks_carousel" data-slide-to="3">WINE</li>
<li data-target="#drinks_carousel" data-slide-to="4">SPIRITS</li>
</ul>
<div class="carousel-inner">
<div class="carousel-item active">
<div class="row">
<div class="col-12">
<h2 class="heading">HOT DRINKS</h2>
</div>
</div>
<div class="row">
<ul class="menu_list">
<li>Espresso <span>£1.80</span></li>
<li>Espresso macchiato <span>£1.90</span></li>
<li>Tea - peppermint / green / camomile / earl grey / yorkshire <span>£1.90</span></li>
<li>Americano <span>£2.00</span></li>
<li>Caffe latte <span>£2.40</span></li>
</ul>
<ul class="menu_list">
<li>Flat white <span>£2.60</span></li>
<li>Cappucino <span>£2.40</span></li>
<li>Mocha <span>£2.60</span></li>
<li>Hot chocolate <span>£2.40</span></li>
</ul>
</div>
</div>
<div class="carousel-item">
<div class="row">
<div class="col-12">
<h2 class="heading">SOFT DRINKS</h2>
</div>
</div>
<div class="row">
<ul class="menu_list">
<li>San pellegrino cans – blood orange / limonata/ orange pomegranate<span>£1.80</span></li>
<li>Harrogate spring still water <span>£1.40</span></li>
<li>Smeraldina sparkling water<span>£2.00</span></li>
</ul>
<ul class="menu_list">
<li>Fresh juice – orange / apple <span>£1.80</span></li>
<li>Coca cola / sprite <span>£1.50</span></li>
</ul>
</div>
</div>
<div class="carousel-item">
<div class="row">
<div class="col-12">
<h2 class="heading">BEER</h2>
</div>
</div>
<div class="row">
<ul class="menu_list full">
<li>Draught – birra moretti <span>½ pint £2.20</span>span> <span>Pint £4.40</span></li>
<li>Speciality birra moretti<span>toscana £4.80</span> <span>siciliana £4.80</span></li>
</ul>
</div>
</div>
<div class="carousel-item">
<div class="row">
<div class="col-12">
<h2 class="heading">WINE</h2>
</div>
</div>
<div class="row">
<ul class="menu_list">
<li class="section_title">House</li>
<li>Tenuta san marco white / red<span>125ML £2.75</span> <span>250ML £5.50</span> <span>500ML carafe £11.00</span></li>
<li class="section_title">Red</li>
<li>Malbec- El Finatello; Chile <span>250ML £6.50</span> <span>Bottle £19.50</span></li>
<li>Chianti D.O.C. - Vernaiolo; Italy <span>250ML £7.00</span> <span>Bottle £21.00</span></li>
</ul>
<ul class="menu_list">
<li class="section_title">White</li>
<li>Gavi Di Gavi – conti speroni; Italy <span>250ML £7.00</span> <span>Bottle £21.00</span></li>
<li>Sauvignon Blanc- Clifford Quay; New Zealand <span>250ML £7.50</span> <span>Bottle £22.00</span></li>
<li class="section_title">Rose</li>
<li>Pinot Grigio Rose – Villa Serena; Italy <span>250ML £6.50</span> <span>Bottle £19.50</span> </li>
</ul>
<ul class="menu_list">
<li class="section_title">Prosecco</li>
<li>Miol D.O.C. Treviso – Italy <span>125ML £6.00</span> <span>Bottle £24.00</span></li>
</ul>
</div>
</div>
<div class="carousel-item">
<div class="row">
<div class="col-12">
<h2 class="heading">SPIRITS</h2>
</div>
</div>
<div class="row">
<ul class="menu_list">
<li>Aperol Spritz <span>£6.90</span></li>
<li>Grappa Invecchiata<span>£3.50</span></li>
</ul>
<ul class="menu_list">
<li>Limoncello <span>£3.50</span></li>
<li>Malfy Gin & Fever Tree Tonic – Sicilian bloody orange / Sicilian pink grapefruit / Limone / Originale <span>£6.50</span></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>

Related

<div> on same blocks but with spacing

I have a footer I am working on called <footer class="site-footer">, inside this footer there is a container <div class="container"> and inside this container, 3 divisions. col-sm-12 col-md-6 and col-xs-6 col-md-3 (2 of col-xs-6 col-md-3).
What I am doing here is making these 3 divisions on the same block. but with spacing.
I used :
.row{
display: flex;
}
row class is the class that contains these 3 divisions.
The picture below shows what I am asking, I need to make distance between the About, Hot Offers and Links sections. On the other hand the social profiles below should be on the right.
The full code of the footer is:
.row {
display: flex;
}
<!-- Bootstrap 4.1.3 -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<!-- Site footer -->
<footer class="site-footer">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-6">
<h6>About</h6>
<p class="text-justify">Paragraph about us.</p>
</div>
<div class="col-xs-6 col-md-3">
<h6>Hot Offers</h6>
<ul class="footer-links">
<li> Offer 1 </li>
<li> Offer 2 </li>
<li> Offer 3 </li>
</ul>
</div>
<div class="col-xs-6 col-md-3">
<h6>Quick Links</h6>
<ul class="footer-links">
<li>About Us</li>
<li>Contact Us</li>
<li>Refund Policy</li>
<li>Sitemap</li>
</ul>
</div>
</div>
<hr>
</div>
<div class="container">
<div class="row">
<div class="col-md-8 col-sm-6 col-xs-12">
<p class="copyright-text">Copyright © 2021 All Rights Reserved by
-.
</p>
</div>
<div class="col-md-4 col-sm-6 col-xs-12">
<ul class="social-icons">
<li><a class="facebook" href="#"><i class="fa fa-facebook"></i></a></li>
<li><a class="twitter" href="#"><i class="fa fa-twitter"></i></a></li>
<li><a class="linkedin" href="#"><i class="fa fa-linkedin"></i></a></li>
</ul>
</div>
</div>
</div>
</footer>
If you want to add space between your blocks you can add padding on your element (your 4 columns).
With Bootstrap you can add (for example) the class "px-2" to each of your column. Like :
<div class="col-xs-12 col-md-3 px-2">
This will add 0.5 inner space on right and left of your column.
Using spacing with Bootstrap : https://getbootstrap.com/docs/4.0/utilities/spacing/
If you don't use Bootstrap, just add padding style property to your element, like :
.column{
padding: 0 0.5rem // will add margin on right and left
}
Also, if you want to add your social profils on the same row, on the right, you have to put you DIV element on the same DIV with class "row", like below.
With the class "col-md-3" on each DIV, the columns will be displayed on the same row from medium screens to extra large screen.
Bootstrap grid system : https://getbootstrap.com/docs/4.0/layout/grid/
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<!-- Site footer -->
<footer class="site-footer">
<div class="container">
<!-- One row with the 4 columns -->
<div class="row">
<div class="col-xs-12 col-md-3 px-2">
<!-- "About" content -->
<h6>About</h6>
<p class="text-justify">Paragraph about us.</p>
</div>
<div class="col-xs-6 col-md-3 px-2">
<!-- "Hot Offers" content -->
<h6>Hot Offers</h6>
<ul class="footer-links">
<li> Offer 1 </li>
<li> Offer 2 </li>
<li> Offer 3 </li>
</ul>
</div>
<div class="col-xs-6 col-md-3 px-2">
<h6>Quick Links</h6>
<ul class="footer-links">
<li>About Us</li>
<li>Contact Us</li>
<li>Refund Policy</li>
<li>Sitemap</li>
</ul>
</div>
<div class="col-xs-6 col-md-3 px-2">
<h6>Social profiles</h6>
<ul class="social-icons">
<li><a class="facebook" href="#"><i class="fa fa-facebook"></i>FB</a></li>
<li><a class="twitter" href="#"><i class="fa fa-twitter"></i>Twitter</a></li>
<li><a class="linkedin" href="#"><i class="fa fa-linkedin"></i>LinkedIn</a></li>
</ul>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-8 col-sm-6 col-xs-12">
<p class="copyright-text">Copyright © 2021 All Rights Reserved by
-.
</p>
</div>
</div>
</div>
</footer>
Finally, about your comment on your answer "if I use bootstrap everything works out but some of the text went bold, etc", you can only import bootstrap-grid.css or bootstrap-grid.min.css.
It only includes grid system and flex utilities without all styles on elements.

How do I put a picture in front of the text in the bar I created

I have a simple problem, I can't solve.
I have to get a picture in front of the text in my bar.
Could someone help me with it?
Im trying to get the image in front of the "witbrood"
Do I need to use CSS for this or something else?
This is my code:
img { max-width: 100%; height: auto; }
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js"></script>
<center><title>De Soete Suikerbol</title></center>
<ul data-role="listview" class="ui-listview">
<li class="ui-li-has-thumb ui-first-child">
<a href="#pag2" class="ui-btn ui-btn-icon-right ui-icon-carat-r">
<img src="groente1.jpg">
<h2>Bloemkool</h2><p>€ 1 per stuk</p></a>
</li>
<li class="ui-li-has-thumb">
<a href="#pag3" class="ui-btn ui-btn-icon-right ui-icon-carat-r">
<img src="groente2.jpg">
<h2>Paprika</h2><p>€ 1,49 per 3 stuks</p></a>
</li>
<li class="ui-li-has-thumb ui-last-child">
<a href="#pag4" class="ui-btn ui-btn-icon-right ui-icon-carat-r">
<img src="groente3.jpg">
<h2>Spruitjes</h2><p>€ 0,99 per 500 gram</p></a>
</li>
</ul>
</div></div>
<div data-role="page" id="pag1">
<center><div data-role="header"> De Soete Suikerbol </div>
<div data-role="collapsible">
<h1>Kies uw brood</h1>
<ul data-role="listview">
<li>Witbrood</li>
</ul>
<ul data-role="listview">
<li>Bruinbrood</li>
</ul>
<ul data-role="listview">
<li>Krentenbrood</li>
</ul>
</div>
<div role="main" class="ui-content">
<img src="img/brood.jpg" </div>
<p> Welkom op de website van de Soete Suikerbol. <br> Op deze site vind je informatie over brood & banket!</p>
</div>
<div data-role="navbar">
<div data-role="main" class="ui-content">
<center>
Home
Banket </center>
</div>
</div>
<div data-role="footer">
<h1> © Thom Hendriks </h1>
</div>
</div>
</div>
</div>
If you mean you want to put text in front of the image, you can use background image
You can try using img as shown below:
ul li img {
width: 20px;
padding-right: 10px;
vertical-align: bottom;
}
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js"></script>
<center>
<title>De Soete Suikerbol</title>
</center>
<ul data-role="listview" class="ui-listview">
<li class="ui-li-has-thumb ui-first-child">
<a href="#pag2" class="ui-btn ui-btn-icon-right ui-icon-carat-r">
<img src="groente1.jpg">
<h2>Bloemkool</h2>
<p>€ 1 per stuk</p>
</a>
</li>
<li class="ui-li-has-thumb">
<a href="#pag3" class="ui-btn ui-btn-icon-right ui-icon-carat-r">
<img src="groente2.jpg">
<h2>Paprika</h2>
<p>€ 1,49 per 3 stuks</p>
</a>
</li>
<li class="ui-li-has-thumb ui-last-child">
<a href="#pag4" class="ui-btn ui-btn-icon-right ui-icon-carat-r">
<img src="groente3.jpg">
<h2>Spruitjes</h2>
<p>€ 0,99 per 500 gram</p>
</a>
</li>
</ul>
</div>
</div>
<div data-role="page" id="pag1">
<center>
<div data-role="header"> De Soete Suikerbol </div>
<div data-role="collapsible">
<h1>Kies uw brood</h1>
<ul data-role="listview">
<li>
<span><img src="https://via.placeholder.com/150"></span><span>Witbrood</span>
</li>
</ul>
<ul data-role="listview">
<li>
<span><img src="https://via.placeholder.com/150"></span><span>Bruinbrood</span>
</li>
</ul>
<ul data-role="listview">
<li>
<span><img src="https://via.placeholder.com/150"></span><span>Krentenbrood</span>
</li>
</ul>
</div>
<div role="main" class="ui-content">
<img src="img/brood.jpg" </div>
<p> Welkom op de website van de Soete Suikerbol. <br> Op deze site vind je informatie over brood & banket!</p>
</div>
<div data-role="navbar">
<div data-role="main" class="ui-content">
<center>
Home
Banket </center>
</div>
</div>
<div data-role="footer">
<h1> © Thom Hendriks </h1>
</div>
</div>
</div>
</div>

Problems with grid

I have created a grid. Each item in this grid has a drawer menu coming out of it downwards on hover. What happens on hover is that all items below get pushed down, i want only the item directly underneath to push down.
Url to this site: http://esgu.no/dev/unicef/menupage.htm
My HTML
<div class="grid alef">
<div class="card w33">
<img src="assets/3.jpg">
<div class="orange subm">
Barns rettigheter
</div>
<ul class="acti obord">
<li>Historie</li>
<li>Barnas rettigheter i Norge</li>
</ul>
</div>
<div class="card w33">
<img src="assets/3.jpg">
<div class="pink subm">
Unicef og barn i verden
</div>
<ul class="acti pbord">
<li>Dette er unicef</li>
<li>Fakta om barn</li>
<li>Barnearbeid</li>
</ul>
</div>
<div class="card w33">
<img src="assets/3.jpg">
<div class="green subm">
Unicef-runden
</div>
<ul class="acti gbord">
<li>Meld på skolen</li>
<li>Bilder fra runden</li>
</ul>
</div>
<div class="card w33">
<img src="assets/3.jpg">
<div class="lblue subm">
FN´s bærekraftsmål
</div>
</div>
<div class="card w33">
<img src="assets/3.jpg">
<div class="red subm">Til deg som er fadder</div>
<ul class="acti rbord">
<li>Faddertips</li>
<li>Faddertesten</li>
<li>Fadderquiz</li>
<li>Aktivitetshjul</li>
<li>Fadderrebus</li>
<li>Fadderkryssord</li>
</ul>
</div>
<div class="card w33">
<img src="assets/3.jpg">
<div class="yellow subm">
Kryssord og andre nøtter
</div>
<ul class="acti ybord">
<li>Kryssord</li>
<li>Puslespill</li>
<li>Rebus</li>
</ul>
</div>
<div class="card w33">
<img src="assets/3.jpg">
<div class="dblue subm">
Du kan
</div>
</div>
</div>
My grid CSS
.grid{width:100%;margin:0 auto;padding:40px 10%;font-size:0;text-align:center}.grid > li{width:auto;height:auto;padding:0}
.grid > *{display:inline-block;vertical-align:top;width:100%;font-size:14px;font-size:1rem;padding:20px}
The only way I can think of, is to create 3 UL's and float them left, with a 33.3% width each. Each LI would then be 100%, stacking on top of each other. When you hover over one, it will only push down that UL.
This may not be a valid solution for you but may be an avenue worth exploring!
See this for a quick example - http://codepen.io/conormcafee/pen/MKgdZg
<ul>
<li>Link</li>
<li>Link</li>
<li>Link</li>
</ul>
<ul>
<li>Link</li>
<li>Link<span>Show me</span></li>
<li>Link</li>
</ul>
<ul>
<li>Link</li>
<li>Link</li>
<li>Link</li>
</ul>
ul {
display: block;
float: left;
width: 33.3%;
}
li span {
display: none;
color: red;
}
li:hover span {
display: block;
}

website elements get mixed up when browser gets readjusted

I wrote a website for a travel based start up. It is a static website, not a responsive website. The code is here.
Code:
<div id="mainDiv" class="container">
<div id="header">
<div class="plc">
<h1></h1>
<nav>
<div id="navPos">
<div style="position: relative;right: 113px;">Register</div>
<div style="position: absolute;right: 255px;top: 37px;">Login</div>
<div style="position: absolute;top: 38px;right: 123px;">Market</div>
</div>
</nav>
</div>
</div>
<div id="body" class="container-fluid">
<div id="container">
<div id="overlay"></div>
<div id="menu"></div>
<div id="info">Fill your information here</div>
<div id="formPos"></div>
<div id="or">OR</div>
<div id="fbReg">
<img src="images/fbOne.png" id="fbIcon">
<div id="fbPos">Register with Facebook</div>
</div>
<div id="gReg">
<img src="images/gPlus.jpg" id="gIcon">
<div id="gPos">Register with Google</div>
</div>
<div id="cliPos">
<img src="images/Bistip-in-media.png" id="imgCli">
</div>
</div>
</div>
<div id="footer">
<div id="aboutUs">
About Us
</div>
<div id="aboutList">
<ul>
<li>About us</li>
<li>Media reviews</li>
<li>Bistip guide</li>
</ul>
</div>
<div id="accountInformation">
Account Information
</div>
<div id="accountList">
<ul>
<li>How to login</li>
<li>Create an account</li>
<li>Logout</li>
<li>Join us</li>
</ul>
</div>
<div id="marketInformation">
Market Information
</div>
<div id="marketList">
<ul>
<li>Shop</li>
<li>Shipping</li>
<li>My connection</li>
</ul>
</div>
</div>
</div>
Website in full screen browser appears like this:
Browser is resized like this:
You can see that elements are mixed up. How can I fix this?
This is because you are using position absolute in some elements.
You could try to use bootstrap.css and take off all the positions that you are using.

How to center on HTML5?

On my website, I was previously displaying 4 plan cards. I'm looking on displaying only 3 cards, so I commented one of them. As result, they are not centered. How can I center them?
Here's how it's being currently displayed:
Here's the code:
<!-- Row fuid-->
<div class="row">
<!-- Item table -->
<div class="col-sm-6 col-md-4 col-lg-3">
<div class="item_table">
<div class="head_table">
<h1>FREE</h1>
<h2>£ 0.00 <span>/ Mo</span></h2>
</div>
<ul>
<li class="color">2 GB HDD</li>
<li>25GB Bandwidth</li>
<li class="color">1 E-mail Account</li>
<li>1 Sub Domains</li>
<li class="color">cPanel/Site Creator</li>
<li>1 FTP Account</li>
<li class="color">1 Cron Job</li>
<li>1 Addon Domain</li>
<li class="color">1 Parked Domain</li>
</ul>
Order Now
</div>
</div>
<!-- End Item table -->
<!-- Item table -->
<div class="col-sm-6 col-md-4 col-lg-3">
<div class="item_table">
<div class="head_table">
<h1>PREMIUM</h1>
<h2>£ 0.99 <span>/ Mo</span></h2>
</div>
<ul>
<li class="color">30 GB HDD</li>
<li>1000GB Bandwidth</li>
<li class="color">1024MB RAM</li>
<li>2 Dedicated IP Addresses</li>
<li class="color">cPanel/WHM Included</li>
<li>Open VZ Included</li>
</ul>
Order Now
</div>
</div>
<!-- End Item table -->
<!-- Item table -->
<!--<div class="col-sm-6 col-md-4 col-lg-3">
<div class="item_table">
<div class="head_table">
<h1>V.I.P</h1>
<h2>£ 2.00 <span>/ Mo</span></h2>
<!--<h5>Or $ 150.5 Yearly!</h5>
</div>
<ul>
<li class="color">30 GB HDD</li>
<li>1000GB Bandwidth</li>
<li class="color">1024MB RAM</li>
<li>2 Dedicated IP Addresses</li>
<li class="color">cPanel/WHM Included</li>
<li>Open VZ Included</li>
</ul>
Order Now
</div>
</div>-->
<!-- End Item table -->
You can still use <div align="center">stuff here</div> and it will work fine just if you want the containing items to not center content on them say <tag style="text-align:left;">...</tag>
Another way is to inside your CSS file have the following code:
* { margin:0px auto; }
div.container { width:1000px; border:1px solid black; }
The * applies to the entire page and sets up the page to be centered.
You then need some other tag like div with a set width to take advantage of the property.
In your HTML file:
<div class="container">...</div>
I think there's two answers...
CSS has text-align: center and with Bootstrap's 12 column layout, you need to give each column 4 each I used the col-sm-4 since JSFiddle's window is small.
Here's my example:
http://jsfiddle.net/N7mvN/ make sure to pull the display window open wider to see it
Here's the HTML:
<!-- Row fuid-->
<div>
<div class="row" style="margin:0 auto">
<!-- Item table -->
<div class="col-sm-4">
<div class="item_table" style="background-color:red">
<div class="head_table">
<h1>FREE</h1>
<h2>£ 0.00 <span>/ Mo</span></h2>
</div>
<ul>
<li class="color">2 GB HDD</li>
<li>25GB Bandwidth</li>
<li class="color">1 E-mail Account</li>
<li>1 Sub Domains</li>
<li class="color">cPanel/Site Creator</li>
<li>1 FTP Account</li>
<li class="color">1 Cron Job</li>
<li>1 Addon Domain</li>
<li class="color">1 Parked Domain</li>
</ul>
Order Now
</div>
</div>
<!-- End Item table -->
<!-- Item table -->
<div class="col-sm-4">
<div class="item_table" style="background-color:green">
<div class="head_table">
<h1>PREMIUM</h1>
<h2>£ 0.99 <span>/ Mo</span></h2>
</div>
<ul>
<li class="color">30 GB HDD</li>
<li>1000GB Bandwidth</li>
<li class="color">1024MB RAM</li>
<li>2 Dedicated IP Addresses</li>
<li class="color">cPanel/WHM Included</li>
<li>Open VZ Included</li>
</ul>
Order Now
</div>
</div>
<!-- End Item table -->
<!-- Item table -->
<div class="col-sm-4">
<div class="item_table" style="background-color:blue">
<div class="head_table">
<h1>V.I.P</h1>
<h2>£ 2.00 <span>/ Mo</span></h2>
<h5>Or $ 150.5 Yearly!</h5>
</div>
<ul>
<li class="color">30 GB HDD</li>
<li>1000GB Bandwidth</li>
<li class="color">1024MB RAM</li>
<li>2 Dedicated IP Addresses</li>
<li class="color">cPanel/WHM Included</li>
<li>Open VZ Included</li>
</ul>
Order Now
</div>
</div>
<!-- End Item table -->
</div>
</div>
And some extra CSS:
.item_table {
margin:1.5em;
padding:1em;
text-align:center;
}
Wrap them all in a div with the style attribute set to margin: 0px auto; width: 1000px; where 1000px is the width of the contained elements. ie. will need to be changed considering I don't know the widths of your elements.
html:
<div class="container">
<div class="third inline"><!-- content --></div>
<div class="third inline"><!-- content --></div>
<div class="third inline"><!-- content --></div>
</div>
css
.third{
width:30%;
margin:0;}
.inline{
display:inline-block;}
.container{
width:50%;/*whatever*/
margin:0 auto;}