I've using some code for custom vertical tabs in bootstrap and I trying to make them horizontal and text below every tab but I can't understand exactly how.
<section id="about">
<div class="container">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="feature_header text-center">
<h3 class="feature_title"><b>Tabs</b></h3>
</div>
</div>
</div>
<div class="row">
<div class="feature-tab">
<div class="col-md-2 col-sm-3 col-xs-12">
<ul class="nav nav-tabs main-tab-list text-center" role="tablist">
<li role="presentation" class="active">
<a href="#home" role="tab" data-toggle="tab" >
<div class="single-tab">
<div class="f-icon">
<i class="fa fa-laptop"></i>
</div>
</div>
<h4>Tab 1</h4>
</a>
</li>
<li role="presentation" >
<a href="#profile" role="tab" data-toggle="tab">
<div class="single-tab">
<div class="f-icon">
<i class="fa fa-send"></i>
</div>
</div>
<h4>Tab 2</h4>
</a>
</li>
<li role="presentation" >
<a href="#messages" role="tab" data-toggle="tab">
<div class="single-tab">
<div class="f-icon">
<i class="fa fa-heart"></i>
</div>
</div>
<h4>Tab 3</h4>
</a>
</li>
</ul>
</div> <!-- col-md-12 end -->
<div class="col-md-10 col-sm-9 col-xs-12">
<div class="tab-content main-tab-content">
<div role="tabpanel" class="tab-pane active " id="home">
<div class="col-md-12 col-sm-9">
<div class="c-tab">
<h4>Tab 1</h4>
<p>Lorem ipsum.... </p>
More
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane active " id="home">
<div class="col-md-12 col-sm-9">
<div class="c-tab">
<h4>Tab 2</h4>
<p>Lorem ipsum.... </p>
More
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane active " id="home">
<div class="col-md-12 col-sm-9">
<div class="c-tab">
<h4>Tab 3</h4>
<p>Lorem ipsum.... </p>
More
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
I wont post CSS because will be very long instead I'll post the JsFiddle.
For more clear I have made this Jsfiddle. Can some one tell how will this go horizontal. I mean Tab 1, Tab 2 and Tab 3..
You can try as below, i just edited your below class and it works!
you should always give style float: left; and display: inherit; together to do the magic :)
.main-tab-list li{
padding: 10px 0px 10px;
border: 1px solid#eee;
width: 150px;
/* background: #FBFBFB; */
float: left;
margin-bottom: 5px;
border-radius: 5px;
display: inherit;
margin-right: 5px;
}
remove .col-md class from .nav-tabs parent and replace it by .row class, and your `` should be:
.main-tab-list li{
position: relative;
display: inline-block;
float: left; /* or none */
padding: 10px 0px 10px;
border: 1px solid#eee;
width: 150px;
/*background: #FBFBFB;*/
margin-bottom: 5px;
border-radius: 5px;
}
http://jsfiddle.net/yt21wup5/
Related
So I am trying to create a footer and I have a couple of links featured however the default text-decoration on the links is weirdly not responding to text-decoration none. All the other text-decoration options are working except the text-decoration none. I have even tried making changes to the bootstrap.min.css file as I saw it suggested as a solution however it hasn't worked.
.custom-footer{
background-color: tomato;
}
.list-items{
list-style: none;
margin: 0;
padding: 0;
}
.company-item{
text-decoration: none;
color: inherit;
}
<footer>
<div class="container-fluid custom-footer">
<div class="row footer-logo">
<div class="col"><img src="/images/Logo_White.png" alt="" width="150px">
</div>
</div>
<div class="row">
<div class=" col footer-column px-4">
<h6>Company</h6>
<ul class="list-items">
<li class="company-item">Become a rider</li>
<li class="company-item">Our Story</li>
<li class="company-item">Our Team</li>
<li class="company-item">Contacts</li>
<li class="company-item">Partners</li>
</ul>
</div>
<div class="col footer-column">
<h6>Product</h6>
<ul class="list-items">
<li class="product-item">Ride safely</li>
<li class="product-item">How it works</li>
<li class="product-item">testimonials</li>
</ul>
</div>
<div class="col footer-column contacts">
<p>+254 111 220 055</p>
<p>info#tissboda.com</p>
<p>Nairobi, Kenya</p>
</div>
</div>
<div class="row">
<div class="col px-4">
<ul class="list-items">
<li class="social-icons"><i class="fab fa-facebook-square"></i></i></li>
<li class="social-icons"><i class="fab fa-twitter-square"></i></i></li>
<li class="social-icons"><i class="fab fa-instagram-square"></i></i></li>
</ul>
</div>
<div class="col"></div>
<div class="col">
<img src="/images/google-play-badge.png" alt="" width="150px">
</div>
</div>
<div class="row">
<div class="col px-4">
<p>©2021 TissBoda. All Rights Reserved</p>
</div>
<div class="col"></div>
<div class="col d-flex">
<ul class="list-items">
<li class="legal-link">Privacy</li>
<li class="legal-link">Terms</li>
</ul>
</div>
</div>
</div>
</footer>
'none' option.
Give it to the a-element
.company-item a {
text-decoration: none;
color: inherit;
}
This would be your code:
.custom-footer{
background-color: tomato;
}
.list-items{
list-style: none;
margin: 0;
padding: 0;
}
.company-item a{
text-decoration: none;
color: inherit;
}
<footer>
<div class="container-fluid custom-footer">
<div class="row footer-logo">
<div class="col"><img src="/images/Logo_White.png" alt="" width="150px">
</div>
</div>
<div class="row">
<div class=" col footer-column px-4">
<h6>Company</h6>
<ul class="list-items">
<li class="company-item">Become a rider</li>
<li class="company-item">Our Story</li>
<li class="company-item">Our Team</li>
<li class="company-item">Contacts</li>
<li class="company-item">Partners</li>
</ul>
</div>
<div class="col footer-column">
<h6>Product</h6>
<ul class="list-items">
<li class="product-item">Ride safely</li>
<li class="product-item">How it works</li>
<li class="product-item">testimonials</li>
</ul>
</div>
<div class="col footer-column contacts">
<p>+254 111 220 055</p>
<p>info#tissboda.com</p>
<p>Nairobi, Kenya</p>
</div>
</div>
<div class="row">
<div class="col px-4">
<ul class="list-items">
<li class="social-icons"><i class="fab fa-facebook-square"></i></i></li>
<li class="social-icons"><i class="fab fa-twitter-square"></i></i></li>
<li class="social-icons"><i class="fab fa-instagram-square"></i></i></li>
</ul>
</div>
<div class="col"></div>
<div class="col">
<img src="/images/google-play-badge.png" alt="" width="150px">
</div>
</div>
<div class="row">
<div class="col px-4">
<p>©2021 TissBoda. All Rights Reserved</p>
</div>
<div class="col"></div>
<div class="col d-flex">
<ul class="list-items">
<li class="legal-link">Privacy</li>
<li class="legal-link">Terms</li>
</ul>
</div>
</div>
</div>
</footer>
You have to use company-item a when styling because links are styled by default so you have to call directly to that element. Also, added !important; for good measures.
.custom-footer{
background-color: tomato;
}
.list-items{
list-style: none;
margin: 0;
padding: 0;
}
.company-item a {
text-decoration: none !important;
color: inherit;
}
<footer>
<div class="container-fluid custom-footer">
<div class="row footer-logo">
<div class="col"><img src="/images/Logo_White.png" alt="" width="150px">
</div>
</div>
<div class="row">
<div class=" col footer-column px-4">
<h6>Company</h6>
<ul class="list-items">
<li class="company-item">Become a rider</li>
<li class="company-item">Our Story</li>
<li class="company-item">Our Team</li>
<li class="company-item">Contacts</li>
<li class="company-item">Partners</li>
</ul>
</div>
<div class="col footer-column">
<h6>Product</h6>
<ul class="list-items">
<li class="product-item">Ride safely</li>
<li class="product-item">How it works</li>
<li class="product-item">testimonials</li>
</ul>
</div>
<div class="col footer-column contacts">
<p>+254 111 220 055</p>
<p>info#tissboda.com</p>
<p>Nairobi, Kenya</p>
</div>
</div>
<div class="row">
<div class="col px-4">
<ul class="list-items">
<li class="social-icons"><i class="fab fa-facebook-square"></i></i></li>
<li class="social-icons"><i class="fab fa-twitter-square"></i></i></li>
<li class="social-icons"><i class="fab fa-instagram-square"></i></i></li>
</ul>
</div>
<div class="col"></div>
<div class="col">
<img src="/images/google-play-badge.png" alt="" width="150px">
</div>
</div>
<div class="row">
<div class="col px-4">
<p>©2021 TissBoda. All Rights Reserved</p>
</div>
<div class="col"></div>
<div class="col d-flex">
<ul class="list-items">
<li class="legal-link">Privacy</li>
<li class="legal-link">Terms</li>
</ul>
</div>
</div>
</div>
</footer>
.custom-footer{
background-color: tomato;
}
.list-items{
list-style: none;
margin: 0;
padding: 0;
}
.company-item a{
text-decoration: none;
color: inherit;
}
<footer>
<div class="container-fluid custom-footer">
<div class="row footer-logo">
<div class="col"><img src="/images/Logo_White.png" alt="" width="150px">
</div>
</div>
<div class="row">
<div class=" col footer-column px-4">
<h6>Company</h6>
<ul class="list-items">
<li class="company-item">Become a rider</li>
<li class="company-item">Our Story</li>
<li class="company-item">Our Team</li>
<li class="company-item">Contacts</li>
<li class="company-item">Partners</li>
</ul>
</div>
<div class="col footer-column">
<h6>Product</h6>
<ul class="list-items">
<li class="product-item">Ride safely</li>
<li class="product-item">How it works</li>
<li class="product-item">testimonials</li>
</ul>
</div>
<div class="col footer-column contacts">
<p>+254 111 220 055</p>
<p>info#tissboda.com</p>
<p>Nairobi, Kenya</p>
</div>
</div>
<div class="row">
<div class="col px-4">
<ul class="list-items">
<li class="social-icons"><i class="fab fa-facebook-square"></i></i></li>
<li class="social-icons"><i class="fab fa-twitter-square"></i></i></li>
<li class="social-icons"><i class="fab fa-instagram-square"></i></i></li>
</ul>
</div>
<div class="col"></div>
<div class="col">
<img src="/images/google-play-badge.png" alt="" width="150px">
</div>
</div>
<div class="row">
<div class="col px-4">
<p>©2021 TissBoda. All Rights Reserved</p>
</div>
<div class="col"></div>
<div class="col d-flex">
<ul class="list-items">
<li class="legal-link">Privacy</li>
<li class="legal-link">Terms</li>
</ul>
</div>
</div>
</div>
</footer>
i think the problem was it was selecting the list items and not the links
anyway this works
I'm working on a new site (Wordpress with a premium bought template). The template developer hasn't been able to solve this problem, so I'm hoping someone here might be able to help.
If you look at http://test.one.za.com/wp-test/?page_id=112 at the bottom of the page in Chrome, the 3 contact div's aren't aligned correctly. But if you look at this same page in IE or Firefox, it displays just fine.
For the life of me, I cannot figure out what this is or how to fix it.
Here's the CSS:
Main container for the footer:
.main-footer {
position: relative;
background-color: #303030;
overflow: hidden;
}
Here's the container for the "info section":
.main-footer .footer-info-section {
position: relative;
margin-top: -5px;
background-color: #303030;
border-top: 1px solid rgba(255,255,255,0.10);
border-left: 1px solid rgba(255,255,255,0.10);
border-right: 1px solid rgba(255,255,255,0.10);
}
Finally, the code for the divs inside the "info-section":
.main-footer .footer-info-section .info-block {
position: relative;
}
The HTML for the entire footer section:
<footer class="main-footer">
<!--Widgets Section-->
<div class="auto-container">
<div class="widgets-section">
<div class="row clearfix">
<div class="widget_text footer-column col-md-4 col-sm-6 col-xs-12">
<div class="widget_text footer-widget widget_custom_html" id="custom_html-2">
<h2>Test 1</h2>
<div class="textwidget custom-html-widget">sdgsfhdfgg sdfgs dfg sfg fgdgsdfg sdfg sdfg sdf</div>
</div>
</div>
<div class="footer-column col-md-4 col-sm-6 col-xs-12">
<div class="footer-widget widget_categories" id="categories-2">
<h2>Test 2</h2>
<ul>
<li class="cat-item cat-item-16">Home 2</li>
<li class="cat-item cat-item-1">Uncategorized</li>
</ul>
</div>
</div>
<div class="footer-column col-md-4 col-sm-6 col-xs-12">
<div class="footer-widget widget_recent_entries" id="recent-posts-2">
<h2>Test 3</h2>
<ul>
<li>1996</li>
<li>Hello world!</li>
</ul>
</div>
</div>
</div>
</div>
<!--Footer Info Section-->
<div class="footer-info-section">
<div class="row clearfix">
<!--Info Block-->
<div class="info-block col-md-4 col-sm-6 col-xs-12">
<div class="inner">
<div class="icon fa fa-glass"></div>
<h4>Contact 1</h4>
<div class="text">Contact 1</div>
</div>
</div>
<!--Info Block-->
<div class="info-block col-md-4 col-sm-6 col-xs-12">
<div class="inner">
<div class="icon fa fa-music"></div>
<h4>Contact 2</h4>
<div class="text">Contact 2</div>
</div>
</div>
<!--Info Block-->
<div class="info-block col-md-4 col-sm-6 col-xs-12">
<div class="inner">
<div class="icon fa fa-heart"></div>
<h4>Contact 3</h4>
<div class="text">Contact 3</div>
</div>
</div>
</div>
</div>
</div>
<!--Footer Bottom-->
<div class="footer-bottom">
<div class="auto-container">
<div class="row clearfix">
<div class="column col-md-6 col-sm-12 col-xs-12">
<div class="copyright">
ONE Insurance Underwriting Managers (PTY) LTD Reg No. 1996/008987/07 Authorised Financial Services Provider FSP8783 VAT No. 4370160501
</div>
</div>
<div class="nav-column col-md-6 col-sm-12 col-xs-12">
<ul class="footer-nav">
<!-- This is just where the foot-nav is located. Redacted this because the links and class names for those links are tediously long and makes this even harder to read -->
<li>Footer-nav 1</li>
<li>Footer-nav 2</li>
<li>Footer-nav 3</li>
</ul>
</div>
</div>
</div>
</div>
<!--End Footer Bottom-->
</footer>
I've attached a couple of snips showing how it's displayed in the respective browsers.
add clear:both to your code here:
.main-footer .footer-info-section{
clear:both;
}
I'm creating a website and I'm having some issues. I'm using my boss' 4k monitor to test if the my sticky footer is all the way at the bottom. And it's not. The weird thing is that the footer never changes how far down it is even if I change min-height: 100vh; to something higher.
Here's my HTML:
<body>
<div class="page">
<div class="contactandsocial">
<p class="phonenumbers">
Brockville - (613) 865-7733    
Cornwall - (343) 885-7733    
Kingston - (613) 817-7733    
Ottawa - (613) 454-7733
</p>
<form action="http://www.truespeed.ca/contact">
<input type="submit" value="Contact" class="contact" />
</form>
<form action="#">
<input type="submit" value="My Account" class="myaccount" />
</form>
<form action="http://webmail.truespeed.ca/">
<input type="submit" value="Webmail" class="webmail" />
</form>
</div>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="row">
<div class="navbar-header">
<a class="navbar-brand " style="margin-top: -15px; float: left;" href="#">
<img alt="Brand" class="hidden-xs pull-left" style="margin-left: -6px; margin-top: -1px;" src="Images/TrueInternet.png" height="89px" />
</a>
<button class="navbar-toggle" data-toggle="collapse" data-target=".navHeaderCollapse">
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse navHeaderCollapse">
<ul class="nav navbar-nav">
<li>Home</li>
<li class="dropdown">Internet<span class="caret"></span>
<ul class="dropdown-menu">
<li>Cable</li>
<li>DSl</li>
<li>Wireless</li>
<li>Business Cable</li>
<li>Business DSL</li>
</ul>
</li>
<li class="dropdown">Phone<span class="caret"></span>
<ul class="dropdown-menu">
<li>Residential Phone</li>
<li>Business Phone</li>
<li>Transfers and Rates</li>
</ul>
</li>
<li>Android TV</li>
<li>Shaw Direct</li>
<li>Careers</li>
</ul>
</div>
</div>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-md-12">
<div id="trueSlider" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators carousel-indicators-numbers">
<li data-target="#trueSlider" data-slide-to="0"></li>
<li data-target="#trueSlider" data-slide-to="1"></li>
<li data-target="#trueSlider" data-slide-to="2"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="Images/blank.png" class="img-responsive" alt="Promotions" />
<div class="carousel-caption">
<h1>Promotions!</h1>
</div>
</div>
<div class="item">
<img src="Images/blank.png" class="img-responsive" alt="Promotions" />
<div class="carousel-caption">
<h1>News and Alerts!</h1>
</div>
</div>
<div class="item">
<img src="Images/blank.png" class="img-responsive" alt="Promotions" />
<div class="carousel-caption">
<h1>Shaw Direct!</h1>
</div>
</div>
</div>
<a class="left carousel-control" href="#trueSlider" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#trueSlider" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</div>
<div class="page-content">
<p>Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.Test.</p>
</div>
</div>
<footer>
<div class="container-fluid">
<div class="row">
<div class="col-md-2 footersocial">
<i class="hidden-xs fa fa-facebook-official fa-3x socialicons" aria-hidden="true"></i>
<i class="hidden-xs fa fa-twitter fa-3x socialicons" aria-hidden="true"></i>
<i class="hidden-xs fa fa-instagram fa-3x socialicons" aria-hidden="true"></i>
</div>
</div>
<div class="row footerlinks" style="margin-left: 15px; margin-top: 15px;">
<div class="col-xs-12 col-md-2 text-center">
<p>Privacy Policy</p>
</div>
<div class="col-xs-12 col-md-2 text-center">
<p>Terms of Service</p>
</div>
<div class="col-xs-12 col-md-2 text-center">
<p>Acceptable Use Policy</p>
</div>
<div class="col-xs-12 col-md-2 text-center">
<p>Warranty & Returns Policy</p>
</div>
<div class="col-xs-12 col-md-2 text-center">
<p>Third Party Copyright Notices</p>
</div>
<div class="col-xs-12 col-md-2 text-center">
<p style="text-align: center;">Terms of Service for Phone</p>
</div>
<div class="col-xs-12 col-md-12 text-center">
<p>Truespeed Internet Services Inc. 2014-2016, all rights reserved.</p>
</div>
</div>
</div>
</footer>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://use.fontawesome.com/42e4157b18.js"></script>
</body>
And my CSS:
.page {
display: flex;
flex-wrap: wrap;
flex-direction: column;
min-height: 100vh;
}
.page-content {
flex: 1;
width: auto;
}
html, body {
height: 100%;
width: auto;
}
footer {
background-color: #00AEFE;
height: auto;
}
footer p {
color: white;
}
Make sure that your <footer> has no padding or margin values:
footer {
background-color: #00AEFE;
height: auto;
margin: 0;
padding: 0;
}
How do I put a div inside two rows but in one column in a way that it will work dynamically with bootstrap?
HTML
<div class="container" id="centered">
<div id="outletsBackground">
<div class="row">
<ul class="list-inline">
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<li>
<a href="#">
<div class="topicBox littleSquare"></div>
</a>
</li>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<li>
<a href="#">
<div class="topicBox littleSquare"></div>
</a>
</li>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<li>
<a href="#">
<div class="topicBox littleSquare"></div>
</a>
</li>
</div>
</ul>
</div>
<div class="row">
<ul class="list-inline">
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<li>
<a href="#">
<div class="topicBox littleSquare"></div>
</a>
</li>
<li>
<a href="#">
<div class="topicBox littleSquare"></div>
</a>
</li>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<li>
<a href="#">
<div class="topicBox littleSquare"></div>
</a>
</li>
<li>
<a href="#">
<div class="topicBox littleSquare"></div>
</a>
</li>
<div>
<a href="#">
<div class="topicBox bigSquare"></div>
</a>
</div>
</div>
</ul>
</div>
</div>
</div>
CSS
.topicBox {
display: inline-block;
line-height: 24px;
text-align: center;
background: white;
}
.littleSquare {
width: 315px;
height: 250px;
margin-bottom: 10px;
margin-top: 10px;
}
.bigSquare {
width: 315px;
height: 525px;
margin-bottom: 10px;
margin-top: 10px;
}
Expected Result
Actual Result
I would would also like information on how I could easily make the larger boxes move in different sections of the site.
Your HTML is not valid and your are using bootstrap in wrong pattern, See how i wrapped the second and third line into a larger div then using rows inside that div.
<div class="container" id="centered">
<div id="outletsBackground">
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="topicBox littleSquare"></div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="topicBox littleSquare"></div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="topicBox littleSquare"></div>
</div>
</div>
<div class="row">
<!-- Wrapping two boxes into a larger box -->
<div class="col-lg-8 col-md-8 col-xs-12">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="topicBox littleSquare"></div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="topicBox littleSquare"></div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="topicBox littleSquare"></div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="topicBox littleSquare"></div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-xs-12">
<div class="topicBox bigSquare"></div>
</div>
</div>
</div>
</div>
in CSS I am adding body background as red just for demo.
.topicBox {
display: inline-block;
line-height: 24px;
text-align: center;
background: #fff;
}
.littleSquare {
width: 315px;
height: 250px;
margin-bottom: 10px;
margin-top: 10px;
}
.bigSquare {
width: 315px;
height: 525px;
margin-bottom: 10px;
margin-top: 10px;
}
body {
background-color: red;
}
My codepen: http://codepen.io/helloworld/pen/razoxg?editors=110
I have 3 rows with each 3 columns.
How can I give each row or all 3 columns the same fixed height so one tile is not larger than the other?
<div class="container-fluid">
<!-- Page Header -->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Electronics
</h1>
</div>
</div>
<!-- /.row -->
<!-- 1st Row -->
<div class="row">
<div class="col-xs-4">
<div class="panel industry-tile-medium">
<div class="panel-body">
<header>Customer</header>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-xs-6">
<img class="img-responsive" src="http://s16.postimg.org/tqs90puwl/customer.png"></img>
</div>
<div class="col-xs-6 col-bottom">
<ul class="list-group">
<li class="list-group-item ">Intel</li>
<li class="list-group-item ">Micron</li>
<li class="list-group-item ">Infineon</li>
<li class="list-group-item ">First Solar</li>
</ul>
</div>
</div>
</div>
</div>
<!-- /.panel -->
</div>
<div class="col-xs-4">
<div class="panel special-tile">
<div class="panel-body special-tile">
</div>
<div class="panel-footer special-tile">
<div class="row">
<div class="col-xs-3">
<img class="img-responsive" src="http://s7.postimg.org/agarkavmj/whoiswho.png"></img>
</div>
<div class="col-xs-9" >
<div class="row">
<div id="page-header" class="page-header">
<h4>Who is who
<p>
<small>Organization & Processes</small>
</p>
</h4>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<ul class="list-group">
<li class="list-group-item ">Org Charts </li>
<li class="list-group-item ">GAM / KAM Charts</li>
<li class="list-group-item ">Process flow</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /.panel -->
</div>
<!-- /.col -->
<div class="col-xs-4">
<div class="panel industry-tile-medium">
<div class="panel-body">
<header>CEO Blog</header>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-xs-3">
<i style="color:orange;" class="fa fa-rss-square fa-5x"></i>
</div>
<div class="col-xs-9">
Lorem ipsum dolor sit amet, consetetur sadipscetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
</div>
</div>
</div>
</div>
<!-- /.panel -->
</div>
<!-- column -->
</div>
<!-- /.row -->
<!-- 2nd Row -->
<div class="row">
<div class="col-xs-4">
<div class="panel industry-tile-medium">
<div class="panel-body">
<header>On-going Projects & Webcam</header>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-xs-6">
<img class="img-responsive" src="http://s16.postimg.org/tqs90puwl/customer.png"></img>
</div>
<div class="col-xs-6 col-bottom">
<ul class="list-group">
<li class="list-group-item ">GF Project Malta</li>
<li class="list-group-item ">Intel Israel</li>
</ul>
</div>
</div>
</div>
</div>
<!-- /.panel -->
</div>
<!-- /.col -->
<div class="col-xs-4">
<div class="panel personal-tile-medium">
<div class="panel-body">
<header> Personal Links </header>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-xs-12">
<ul class="list-group">
<li class="list-group-item ">Org Charts</li>
<li class="list-group-item ">GAM / KAM Charts</li>
<li class="list-group-item ">Process flow</li>
</ul>
</div>
</div>
</div>
</div>
<!-- /.panel -->
</div>
<div class="col-xs-4">
<div class="row half-tile half-tile-top">
<div class="col-xs-6">
<img class="img-responsive" src="http://s16.postimg.org/tqs90puwl/customer.png"></img>
</div>
<div class="col-xs-6">
Presentations
</div>
</div>
<!-- ./row -->
<div class="row half-tile">
<div class="col-xs-6">
<img class="img-responsive" src="http://s16.postimg.org/tqs90puwl/customer.png"></img>
</div>
<div class="col-xs-6">
Events, Trade Shows & Conferences
</div>
</div>
<!-- ./row -->
</div>
</div>
<!-- 3rd Row -->
<div class="row">
<div class="col-xs-4 portfolio-item">
<div class="panel industry-tile-medium">
<div class="panel-body">
<header>Project Library and References</header>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-xs-6">
<img class="img-responsive" src="http://s1.postimg.org/go41exp63/Reports.png"></img>
</div>
<div class="col-xs-6">
<ul class="list-group">
<li class="list-group-item">GF Project Malta</li>
<li class="list-group-item">Intel Israel</li>
</ul>
</div>
</div>
</div>
</div>
<!-- /.panel -->
</div>
<div class="col-xs-4">
<div class="panel branch-tile-medium">
<div class="panel-body">
<header>Industry Links</header>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-xs-12">
<ul class="list-group">
<li class="list-group-item"> www.semi.org</li>
<li class="list-group-item">www.vdma.org</li>
<li class="list-group-item">www.visi.org</li>
</ul>
</div>
</div>
</div>
</div>
<!-- /.panel -->
</div>
<div class="col-xs-4 portfolio-item">
<div class="panel branch-tile-medium">
<div class="panel-body">
<header>Competition</header>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-xs-12">
<ul class="list-group">
<li class="list-group-item"> CH2MHill</li>
<li class="list-group-item">Bechtel</li>
<li class="list-group-item">Jacobs Engineering</li>
</ul>
</div>
</div>
</div>
</div>
<!-- /.panel -->
</div>
</div>
<!-- /.row -->
<hr>
<!-- News -->
<div class="row">
<!-- Electronic news -->
<div class="col-xs-6">
<div class="panel industry-tile-medium">
<div class="panel-body">
<header>Electronic News</header>
</div>
<div class="panel-footer">
<div class="row">
<div>
<ul>
<li>05-Dec ATF in-house news channel</li>
<li>06-Dec ATF in-house news channel</li>
<li>07-Dec ATF in-house news channel</li>
</ul>
</div>
</div>
</div>
</div>
<!-- /.panel -->
</div>
<!-- Industry News -->
<div class="col-xs-6">
<div class="panel branch-tile-medium">
<div class="panel-body">
<header>Industry News</header>
</div>
<div class="panel-footer">
<div class="row">
<div>
<ul>
<li>05-Dec links to global news</li>
<li>06-Dec links to global news</li>
<li>07-Dec links to global news</li>
</ul>
</div>
</div>
</div>
</div>
<!-- /.panel -->
</div>
</div>
<!-- /.row -->
<hr>
<!-- Copyright -->
<footer>
<div class="row">
<div class="col-lg-12">
<p>Copyright © XXX</p>
</div>
</div>
<!-- /.row -->
</footer>
</div>
* {
Box-sizing: Border-box;
border-radius: 0 !important; /* Remove rounded borders from whole layout */
}
.special-tile{
background:#006AB3;
}
.special-tile h4, .special-tile small, .special-tile {
color:white;
}
.special-tile .panel-body{
padding:0;
}
.special-tile .panel-footer{
border:0;
}
.half-tile{
background:#006AB3;
color:white;
}
.half-tile-top{
margin-bottom:10px;
}
.industry-tile-medium{
background: #006AB3;
border: 1px solid #006AB3;
}
.industry-tile-medium .panel-footer{
background: #F0F8FF;
color:#006AB3;
}
.branch-tile-medium{
background: #006B66;
border: 1px solid #006B66;;
}
.branch-tile-medium .panel-footer{
background: #EFFDFC;
}
.branch-tile-medium .panel-footer a{
color: #006B66;
}
.personal-tile-medium{
background: #5E9629;
border: 1px solid #5E9629;
}
.personal-tile-medium .panel-footer{
background: #F2FEE7;
color: #5E9629;
}
ul
{
list-style-type:none;
}
ul li a{
text-decoration:underline;
}
.panel .panel-body header
{
color:white;
font-weight:bold;
font-size:1.2em;
}
.list-group-item {
background:transparent;
padding:5px 5px;
}
.panel-body{
padding:6px;
}
If the height of the panels is unknown, or you don't want to set a min height, you can have each panel assume the height of the tallest panel in each row using CSS flexbox. Just add this CSS..
.row, .row > div[class*='col-'] {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
flex:1 0 auto;
}
.panel {
width:100%;
}
Demo: http://bootply.com/yTIGMotDkp
Here is a working Fiddle.
While using bootstrap, you need to always need to make some changes according to your need. You can override the bootstrap style by applying your own styles through classes to DOM elements.
You need to define panel height in your css so that your tiles will get the same height.
As you have already written a lot of css in your page, so I use all or your 'css' and made some changes in it.
There are a number of ways you can do this. You could apply a height to your columns
.col-xs-4 {
height: 150px;
}
However this wont' work very well if the content is dynamic because if the length exceeds 150px it will be hidden or you'll get scrolling depending on your CSS rules. You could use min-height which will work better but not ideal.
Alternatively you could apply display: flex to your row container element
.row {
display: flex;`
....
}
Here is a working example of that