Changing bootstrap grid margins - html

I'm a begginer coder and i'm learning to use bootstrap grid. Although, i didn't quite understand how the container margins work.
I wrote this piece of coding for a website footer and tried using bootstrap grid, but i wanted the social icons to be about 20px to the right and i can't get it. Inspecting the element at google chrome i can see there is a margin right but i can't seem to customize it and make it smaller.
take a look - this is my footer's html code:
<footer>
<div class="row container">
<div class="logo-rodape col-md-2">
<img src="img/logo-principal-white-gota.png" alt="Logo Picada Zero">
</div>
<div class="r-content col-md-4">
<p class="slogan-title">CLEAN AND PROTECTION</p>
<p class="slogan-sub">Proteção e limpeza para sua família</p>
</div>
<div class="r-social col-md-5">
<i class="fa fa-facebook fa-2x" aria-hidden="true" style="color:#fff"></i>
<i class="fa fa-vimeo fa-2x" aria-hidden="true" style="color:#fff"></i>
</div>
</div>
</footer>
Now, this is my CSS code:
footer{
background: url(../img/rodape-background.png);
clear: both;
padding: 50px 0;
}
footer .container{
position: relative;
margin-left: 80px;
box-sizing: border-box;
margin-top: 50px;
}
.logo-rodape {
padding: 0;
margin: 0 auto;
box-sizing: border-box;
display: inline-block;
}
.r-content {
padding: 0;
box-sizing: border-box;
display: inline-block;
text-align: left;
margin-left: 30px;
margin-top: 20px;
}
.slogan-title {
font-family: "avenir next condensed";
font-size: 0.3em;
font-size: calc(0.3em + 1vw);
#include screen-above(800px) {
font-size: 0.4em;
}
font-weight: 600;
letter-spacing: 1.5px;
margin-bottom: -2px;
color: #fff;
}
.slogan-sub {
font-family: 'Lato', sans-serif;
font-size: 0.2em;
font-size: calc(0.2em + 1vw);
#include screen-above(800px) {
font-size: 0.3em;
}
font-weight: 300;
letter-spacing: 1px;
color: #fff;
}
.r-social {
text-align: right;
box-sizing: border-box;
display: inline-block;
margin-top: 40px;
margin-left: 60px;
}
.fa-facebook {
padding-right: 20px;
}
a i.fa:hover {
color: #57cdf7; !important;
}
I'll be really glad with any suggestions, I tried out everything I know so far and couldn't get it right.
Thanks!

I'm assuming that your question means you want the social icons to sit on the FAR right of the screen, not necessarily in the confines of the grid that Bootstrap sets.
You would be messing with the Bootstrap grid to re-define .container like you did, and there are issues that go along with that (as you saw).
The best bet is to create an entirely separate component that you can move to wherever you want, independent of the Bootstrap grid.
HTML
<div class="social-icons">
<ul>
<li>Social Icon</li>
<li>Another Icon</li>
</ul>
</div>
CSS
.social-icons {
position: fixed;
bottom: -10px;
right: -5px;
}
ul {
list-style: none;
}
.social-icons li {
display: inline;
padding-right: 30px;
padding-bottom: 20px;
width: 100px;
}
CodePen
This in particular glues the social icons to the bottom of the page regardless of scrolling. But it gives you an idea of what to do.

First, you are supposed to wrap the whole content inside the container. Container is pre set class in bootstrap to keep your content in the appropriate place with appropriate width on different size screens.
<div class="container">
<footer>
<div class="row">
<div class="logo-rodape col-md-2">
<img src="img/logo-principal-white-gota.png" alt="Logo Picada Zero">
</div>
<div class="r-content col-md-4">
<p class="slogan-title">CLEAN AND PROTECTION</p>
<p class="slogan-sub">Proteção e limpeza para sua família</p>
</div>
<div class="r-social col-md-6">
<i class="fa fa-facebook fa-2x" aria-hidden="true" style="color:#fff"></i>
<i class="fa fa-vimeo fa-2x" aria-hidden="true" style="color:#fff"></i>
</div>
</div>
</footer>
</div> <!--end container-->
Also, the cols should equal to 12. col-md-2 + col-md-4 + col-md-6 = col-md-12.
col-md-12 is the full width of the page.
Here is a good read for you: http://getbootstrap.com/css/
And, what you are seeing in the inspector "margin right by social icons" is padding or the width that is pre set on your container in the bootstrap css.

First, Use row and container Class Separately.
Second, Your cols should equal to 12 as described in bootstrap grid system.
Third, you can also use offsetting columns which increases the left margin. example is given below
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.css"></script>
</head>
<footer>
<div class="container ">
<div class="row ">
<div class="col-md-2">
<img src="img/logo-principal-white-gota.png" alt="Logo Picada Zero">
</div>
<div class=" col-md-4">
<p class="slogan-title">CLEAN AND PROTECTION</p>
<p class="slogan-sub">Proteção e limpeza para sua família</p>
</div>
<div class=" col-md-3 col-md-offset-3">
<i class="fa fa-home fa-2x" aria-hidden="true" ></i>
<i class="fa fa-vimeo fa-2x" aria-hidden="true"></i>
</div>
</div>
</div>
</footer>

Related

Font awesome icon not centering

JS: http://jsfiddle.net/1cmtpnha/
I have this:
<div class="card-body">
<div class="padding_5">
<div class="icon-center">
<i class="fa fa-twitter" aria-hidden="true"></i>
</div>
</div>
</div>
padding_5 just contains padding css
card-body is bootstrap 4
I tried this:
[class*="icon-"] {
display: inline-block;
width: 100%;
}
.icon-center i {
text-align: center;
}
and this:
.icon-center {
margin: auto;
display: block;
}
and neither worked. Those were top checked responses i saw on SO.
What is wrong with my code?
I want it to be horizontally centered within a card-body.
It's not the bootstrap either. I tested it on a separate page with no css or card-body. Still same issue.
You have three options here
1. Parent: text-align: center
set text-align: center to body.
2. Child: display: block and text-align: center
set display: block to .icon-center.
3. Child display: block , set width and margin: auto
set display: block , width: 20px and margin: auto to .icon-center.
https://codepen.io/blackcityhenry/pen/WPexKp
.icon-center {
text-align:center;
}
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="card-body">
<div class="padding_5">
<div class="icon-center">
<i class="fa fa-twitter" aria-hidden="true"></i>
</div>
</div>
</div>
Just add text-align: center; to the parent card-body
.card-body{
border: 1px solid red;
text-align: center;
}
.padding_5 {
padding: 10px;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" type="text/css" />
<div class="card-body">
<div class="padding_5">
<div class="icon-center">
<i class="fa fa-twitter" aria-hidden="true"></i>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.bundle.min.js"></script>

How to arrange nested divs next to each other using inline block or flex

How to arrange nested divs next to each other using inline block or flex
I have 3 elements in my html.
One icon, and two text elements.
I want the icon to be on left and then the text on top of each other.
I am trying to do this using following html and css, which works partially. The icon is way down and I tried moving it up. More over , I think there is a better and right way of doing this.
body {
background-color: #D2D5DD;
}
.auto-complete-box {
display: inline;
margin-top: -20px;
}
.auto-complete-tag {
margin-top: 15px;
margin-left: 5px;
display: inline-block;
}
.tag-header {
text-transform: uppercase;
letter-spacing: 1px;
color: #0083cb;
}
.tag-description {
font-weight: 100;
font-size: 12px;
padding: 1px;
color: #798071;
margin-top: 3px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet" />
<div>
<div class="auto-complete-box">
<i class="fa fa-bars"></i>
</div>
<div class="auto-complete-tag">
<div class="tag-header">HeaderValue</div>
<div class="tag-description">Item description</div>
</div>
</div>
<div>
<div class="auto-complete-box">
<i class="fa fa-bars"></i>
</div>
<div class="auto-complete-tag">
<div class="tag-header">Header 2 </div>
<div class="tag-description">Item description</div>
</div>
</div>
Edit:
The divs are aligned and the icon also aligned to the div(s) on right side , probably by using stretch.
Use display:flex to wrap div and remove unnecessary code(inline/inline-block)
body {
background-color: #D2D5DD;
}
.wrap{
display:flex;
}
.tag-header {
text-transform: uppercase;
letter-spacing: 1px;
color: #0083cb;
}
.tag-description {
font-weight: 100;
font-size: 12px;
padding: 1px;
color: #798071;
margin-top: 3px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet" />
<div class="wrap">
<div class="auto-complete-box">
<i class="fa fa-bars"></i>
</div>
<div class="auto-complete-tag">
<div class="tag-header">HeaderValue</div>
<div class="tag-description">Item description</div>
</div>
</div>
<div class="wrap">
<div class="auto-complete-box">
<i class="fa fa-bars"></i>
</div>
<div class="auto-complete-tag">
<div class="tag-header">Header 2 </div>
<div class="tag-description">Item description</div>
</div>
</div>
Another simpler method to use when trying to align components in HTML is to make use of the table structure. Sometimes aligning of certain components don't work when using CSS because there might be a conflicting style element.
So a method I prefer using to ensure that my components are perfectly in line, is to encapsulate them in a table. In your case, put the icon and text element into 2 separate columns within a single row as shown in the code snippet below:
I hope this helps! :)
body {
background-color: #D2D5DD;
}
.auto-complete-box {
display: inline;
margin-top: -20px;
}
.auto-complete-tag {
margin-top: 15px;
margin-left: 5px;
display: inline-block;
}
.tag-header {
text-transform: uppercase;
letter-spacing: 1px;
color: #0083cb;
}
.tag-description {
font-weight: 100;
font-size: 12px;
padding: 1px;
color: #798071;
margin-top: 3px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet" />
<table>
<tr>
<td>
<div>
<div class="auto-complete-box">
<i class="fa fa-bars"></i>
</div></div>
</td>
<td>
<div class="auto-complete-tag">
<div class="tag-header">HeaderValue</div>
<div class="tag-description">Item description</div>
</div>
</td>
<tr>
<td>
<div>
<div class="auto-complete-box">
<i class="fa fa-bars"></i>
</div></div>
</td>
<td>
<div class="auto-complete-tag">
<div class="tag-header">Header 2 </div>
<div class="tag-description">Item description</div>
</div>
</td>
</tr>
</table>
Maybe this way:
.wrap{
display: flex;
align-items: center;
}

Bootstrap icon wrong positioning

I'm new to CSS and HTML, so I got stuck on a very stupid step. The thing is that fa-list-ul icon is wrong positioned. Without text-align:center it positions fine. Any way to fix it? Thanks for spending your time with my problem.
Here's the JSFiddle
And here is my code :
.player{padding:.75rem 1rem;margin-bottom:1rem;line-height:36px}
.player_play{font-size:36px;vertical-align:middle}
.radio_name{vertical-align:middle}
.radio_icon{padding-right:5px;vertical-align:middle}
.radio_select{font-size:20px;vertical-align:middle}
<nav class="player">
<div class="container">
<div class="float-left">
<i class="fa fa-play-circle player_play action"></i>
</div>
<div class="radio_volume">
<i class="fa fa-volume-down"></i>
<i class="fa fa-music radio_icon accent_color"></i><span class="radio_name"> Anison</span>
</div>
<div class="float-right">
<i class="fa fa-list-ul radio_select action"></i>
</div>
</div>
</nav>
Using display: flex will make every element inside that container have the same horizontal size so this should solve your problem:
.container {
display: flex;
}
.float-left {
flex: 1;
}
.radio_volume {
text-align: center;
flex: 1;
}
.float-right {
flex: 1;
}
.float-right i {
float: right;
margin-top: 10px;
}
also here's the jsfiddle: https://jsfiddle.net/fqkvv8es/3/
You can make use of Bootstrap's classes, which results in less code than what the chosen answer uses:
JSFiddle
HTML
<nav class="player">
<div class="container">
<div class="row justify-content-between align-items-center">
<i class="fa fa-play-circle player_play action"></i>
<div class="radio_volume">
<i class="fa fa-volume-down"></i>
<i class="fa fa-music radio_icon accent_color"></i><span class="radio_name"> Station</span>
</div>
<i class="fa fa-list-ul radio_select action"></i>
</div>
</div>
</nav>
CSS
.player {
padding: .75rem 1rem;
margin-bottom: 1rem;
line-height: 36px
}
.player_play {
font-size: 36px;
}
.radio_icon {
padding-right: 5px;
}
.radio_select {
font-size: 20px;
}
JSFiddle

How can I make a bootstrap navbar mobile friendly?

I don't have a specific code example, just looking for a general answer.
I know my navbar doesn't resize well in mobile, so is there a good/correct way to fix this? Someone mentioned using CSS #media queries, but I don't know anything about them.
If I do need media queries, what's a good resource to learn about them? Everything else looks fine when I use col-md-(), just not the navbar.
body {
font-family: 'News Cycle', sans-serif;
font-size: 175%;
}
li {
float: right;
text-align: left
}
link {
link
}
a:link {
text-decoration: none;
color: #000000;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #232323;
}
a:active {
text-decoration: underline;
color: #000000;
}
.main-section {
background-image: url(../img/back.jpg);
background-size: cover;
height: 1000px;
color: white;
}
.navbar {
position: fixed;
width: 100%;
}
.container-fluid {
padding-left: 0px;
}
.main {
padding: 400px 0px 360px 0px;
text-shadow: 1px black;
}
.nav {
float: right;
text-align: left;
font-size: 20px;
letter-spacing: .5px;
}
.headers-bfg {
padding-left: 35px;
}
.navbar-brand {
font-size: 20px;
letter-spacing: .5px;
}
h1 {
font-size: 70px;
}
h3 {
font-size: 35px;
}
.fa-circle {
color: gray;
font-size: .4em;
padding-top: 23px
}
.info-panel {
padding: 50px 50px 50px 50px;
}
.balloon-sect {
background-color: skyblue;
}
.flower-sect {
background-color: #f4f6f9;
}
.gift-sect {
background-color: #ce6640;
}
<!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">
<title>Balloons Flowers and Gifts</title>
<link rel="stylesheet" type="text/css" href="css/bfg.css">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=News+Cycle" type="text/css" rel="stylesheet">
<!-- Spent two hours trying to figure out why my customized CSS wouldn't load in, then realized that I put it in front of bootstrap... -->
<script src="https://use.fontawesome.com/7a267289ed.js"></script>
<link rel="stylesheet" type="text/css" href="css/bfg.css">
<link rel="icon" href="img/icon.png">
</head>
<body>
<div class="container-fluid main-section">
<nav class=" navbar navbar-default">
<div class="container-fluid col-md-12 col-xs-12">
<div class="headers-bfg">
<div class="navbar-header">
<a class="navbar-brand" href="#">BFG</a>
</div>
<div class="navbar-header">
<a class="navbar-brand col-xs-2" href="#"><i class="fa fa-heart" aria-hidden="true"></i></a>
</div>
</div>
<ul class=" nav navbar-nav ">
<li>Balloons</li>
<li><i class="fa fa-small fa-circle" aria-hidden="true"></i></li>
<li>Flowers</li>
<li><i class="fa fa-circle" aria-hidden="true"></i></li>
<li>Gifts</li>
<li><i class="fa fa-circle" aria-hidden="true"></i></li>
<li>Hours</li>
</ul>
</div>
</nav>
<div class="">
<div class="row">
<div class="col-md-12 col-xs-12 text-center main">
<h1>Balloons Flowers and Gifts</h1>
<h3>The perfect way to brighten someone's day, and make them smile!</h3>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-12 col-xs-12 text-center info-panel balloon-sect">
<a href="#">
<h2>Balloons</h2>
</a>
<p> Our hand crafted balloon creations are a hit at every! We have a wide variety of colored and themed balloons ranging from Pokemon GO to a life sized stormtrooper! We also do balloon things for events!</p>
</div>
<div class="col-md-12 col-xs-12 text-center info-panel flower-sect">
<a href="#">
<h2>Flowers</h2>
</a>
<p>Our Flowers are perfect for any occasion! We have a wide variety all year round, just be sure to call for availability! We can do prom flowers, funeral arrangements, and everything in between!</p>
</div>
<div class="col-md-12 col-xs-12 text-center info-panel gift-sect">
<a href="#">
<h2>Gifts</h2>
</a>
</div>
<div class="col-md-12 col-xs-12 text-center">
<a href="#">
<h2>Hours</h2>
</a>
</div>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
html css twitter-bootstrap
You can learn more about CSS #media queries here:
templatemonster.com/blog/css-media-queries...
It explains about media queries and how to make it work on other devices, and it includes an IE 7 and IE 8 fallback mechanism.
IF you want to learn Bootstrap, you can use bootstrap GUI designing tool:
codepley.com/go/bp/new
I do two things. (When the first one not working properly, I'll go to the second method.)
First Method.
I search for common mobile device sizes and used them to adjust the navbar according to it. Common sizes are 320px, 375px, 480px, 640px, 768px, 1024px.
#media (max-width: 600px) {
Your code here
}
Second Method
If my common sizes are not correctly working I tried to reduce the sizes one by one and try to get the absolutely correct matches that may not destroy the website.

Responsive Bootstrap Carousel

I have a web page and I am trying to use a bootstrap carousel. On the first slide there are 3 pictures and on the other slide there is a youtube video embedded to it. The page looks problematic on smaller resolutions.
Here is a how pictures look like on laptop:
pictures on laptop
Here is how youtube video looks like on laptop:
video on laptop
Here is how pictures look like on smaller resolution:
pictures on 320x480
Here is video on smaller resolution:
video on 320x480
Here is video on 360x640:
video on 360x640
Is there a way to make pictures on carousel display on the center when it is smaller resoultion? And of course for the youtube video as well. The video is not on the center and exceeds the screen.
HTML
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="carousel slide" id="myCarousel">
<div class="carousel-inner">
<div class="row item active">
<div class="bannerImage">
<a href="#"><img src="images/waspmote_pro_t.png" alt="">
</a>
<a href="#"><img src="images/waspmote_exp_radio_board_2-375_t.png" alt="">
</a>
<a href="#"><img src="images/u13_gw_t.png" alt="">
</a>
</div>
<div class="caption row">
<div class="col-md-12">
<h3>Waspmote</h3>
</div>
<div class="row">
<div class="col-md-4">
<ul style="list-style-type: none;">
<li><i class="fa fa-share-alt"></i> Connect any sensor</li>
<li><i class="fa fa-rss"></i> Using any wireless technology</li>
<li><i class="fa fa-cloud"></i> To any Cloud Platform</li>
</ul>
</div>
<div class="col-md-4">
<ul style="list-style-type: none;" class="waspmote">
<li><i class="fa fa-check-circle"></i> Ultra low power (0.7uA)</li>
<li><i class="fa fa-check-circle"></i> 100+ Sensors available</li>
<li><i class="fa fa-check-circle"></i> Over the Air Programming (OTA)</li>
<li><i class="fa fa-check-circle"></i> Encryption Libraries (AES, RSA)</li>
<li><i class="fa fa-check-circle"></i> Encapsulated line available</li>
</ul>
</div>
<div class="col-md-4">
<ul style="list-style-type: none;" class="waspmote">
<li><i class="fa fa-check-circle"></i> Industrial Protocolos: RS-232,RS-485,Modbus,CAN Bus, 4-20mA</li>
<li><i class="fa fa-check-circle"></i> 3G/GPRS/LoRaWAN/LoRa/Sigfox/868/900MHz,ZigBee/802.15.4/WiFi/RFID/ NFC/ Bluetooth 4.0</li>
</ul>
</div>
</div>
</div>
</div>
<!-- /Slide1 -->
<div class="row item">
<div class="bannerImage">
<a href="#"><img src="images/waspmoteps01.png" alt="">
</a>
<a href="#"><img src="images/waspmoteps02.png" alt="">
</a>
<a href="#"><img src="images/waspmote03.png" alt="" class="righter">
</a>
</div>
<div class="caption row">
<div class="col-md-12">
<h3>Waspmote Plug & Sense</h3>
</div>
<div class="row">
<div class="col-md-4">
<ul style="list-style-type: none;">
<li><i class="fa fa-bolt"></i> Easy and fast deployment</li>
<li><i class="fa fa-money"></i> Minimum maintenance costs</li>
<li><i class="fa fa-exchange"></i> Services/network scalability</li>
<li><i class="fa fa-cloud"></i> Any Cloud platform compatible</li>
</ul>
</div>
<div class="col-md-4">
<ul style="list-style-type: none;" class="waspmoteps">
<li><i class="fa fa-check-circle"></i> Integrating more than 80 sensors</li>
<li><i class="fa fa-check-circle"></i> Robust waterproof IP65 enclosure</li>
<li><i class="fa fa-check-circle"></i> Add/change sensor probe in seconds</li>
<li><i class="fa fa-check-circle"></i> Solar powered internal and external panel</li>
</ul>
</div>
<div class="col-md-4">
<ul style="list-style-type: none;" class="waspmoteps">
<li><i class="fa fa-check-circle"></i> Over the air programming (OTAP)</li>
<li><i class="fa fa-check-circle"></i> Graphical/intuitive programming interface</li>
<li class="space"><i class="fa fa-check-circle"></i> ZigBee, 802.15.4, 868, 900, LoRaWAN, LoRa, Sigfox, WiFi, 3G/GPRS and Bluetooth Low Energy</li>
</ul>
</div>
</div>
</div>
</div>
<!-- /Slide2 -->
<div class="row item">
<div class="bannerImage">
<iframe width="480" height="270" src="https://www.youtube.com/embed/f1wXYGDvYAY?rel=0&controls=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
</div>
<div class="caption row">
<div class="col-md-12">
<h3>Waspmote Plug & Sense</h3>
</div>
<div class="row">
<div class="col-md-12 waspmoteps">
<p>The new Waspmote Plug & Sense! line allows developers to forget about electronics and focus on services and applications. Now you can deploy wireless sensor networks in a easy and scalable way ensuring minimum maintenance costs. The new platform consists of a robust waterproof enclosure with specific external sockets to connect the sensors, the solar panel, the antenna and even the USB cable in order to reprogram the node. It has been specially designed to be scalable, easy to deploy and maintain.</p>
</div>
</div>
</div>
</div>
<!-- /Slide3 -->
<div class="row item">
<div class="bannerImage">
<iframe width="480" height="284" src="https://www.youtube.com/embed/GRMMS8nOdwc?rel=0&controls=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
</div>
<div class="caption row">
<div class="col-md-12">
<h3>Waspmote Events Sensor Board</h3>
</div>
<div class="row">
<div class="col-md-12 waspmoteps">
<p>More than 50 available sensors for the Waspmote platform. Values from the temperature, humidity, tilt, vibration, water, PIR, bend sensors integrated in the Events Sensor Board are sent using the 802.15.4/ZigBee radio.</p>
</div>
</div>
</div>
</div>
<!-- /Slide4 -->
</div>
<div class="control-box">
<a data-slide="prev" href="#myCarousel" class="carousel-control left">‹</a>
<a data-slide="next" href="#myCarousel" class="carousel-control right">›</a>
</div>
<!-- /.control-box -->
</div>
<!-- /#myCarousel -->
</div>
<!-- /.span12 -->
</div>
<!-- /.row -->
</div>
<!-- /.container -->
CSS
div {
word-break: break-all;
}
img {
max-width: 100%;
}
a {
-webkit-transition: all 150ms ease;
-moz-transition: all 150ms ease;
-ms-transition: all 150ms ease;
-o-transition: all 150ms ease;
transition: all 150ms ease;
}
a:hover {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
/* IE 8 */
filter: alpha(opacity=50);
/* IE7 */
opacity: 0.6;
text-decoration: none;
}
/* Container */
.container-fluid {
background: #fbf4e0;
margin: 40px auto 10px;
padding: 20px 0px;
max-width: 960px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
/* Page Header */
.page-header {
background: #fbf4e0;
margin: -30px 0px 0px;
padding: 20px 40px;
border-top: 4px solid #ccc;
color: #000;
text-transform: uppercase;
}
.page-header h3 {
line-height: 0.88rem;
color: #000;
}
/* Thumbnail Box */
.caption {
height: 140px;
width: 100%;
margin: 10px 0px;
padding: 20px;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.caption .span4,
.caption .span8 {
padding: 0px 20px;
}
.caption .span4 {
border-right: 1px dotted #CCCCCC;
}
.caption h3 {
color: #000;
line-height: 2rem;
margin: 0 0 20px;
text-transform: uppercase;
font-weight:bold;
}
.caption p {
font-size: 1rem;
line-height: 1rem;
color: #000;
}
.caption ul{
color: #000;
}
.btn.btn-mini {
background: #a83b3b;
border-radius: 0 0 0 0;
color: #fbf4e0;
font-size: 0.63rem;
text-shadow: none !important;
}
.carousel-control {
top: 33%;
}
/* Footer */
.footer {
margin: auto;
width: 100%;
max-width: 960px;
display: block;
font-size: 0.69rem;
}
.footer,
.footer a {
color: #fff;
}
p.right {
float: right;
}
::selection {
background: #ff5e99;
color: #FFFFFF;
text-shadow: 0;
}
::-moz-selection {
background: #ff5e99;
color: #FFFFFF;
}
a,
a:focus,
a:active,
a:hover,
object,
embed {
outline: none;
}
:-moz-any-link:focus {
outline: none;
}
input::-moz-focus-inner {
border: 0;
}
.bannerImage img {
margin-left: 10%;
}
.bannerImage iframe{
margin-left: 25%;
margin-right: 25%;
}
.waspmote{
font-size:13px;
}
.waspmoteps{
font-size:13px;
}
.space{
margin-bottom:34px;
}
.righter{
margin-left:18% !important;
}
edit 1: Here is what happened after media screen addedtexts under pictures are not display on the screen.
media screen
edit 2: Actually this markup works for pictures in the slide but still texts under the pictures are not visible in smaller resolutions.
<div class="bannerImage">
<div class="row productsRow">
<div class="col-md-4">
<img src="images/waspmoteps01.png" alt="">
</div>
<div class="col-md-4">
<img src="images/waspmoteps02.png" alt="">
</div>
<div class="col-md-4">
<img src="images/waspmote03.png" alt="" class="righter">
</div>
</div>
</div>
CSS:
.productsRow {
text-align: center;
margin-left: 10%;
margin-right: 10%;
}
Edit 3: JSFiddle added:
JSFIDDLE
EdiT 4: After removing the height, the videos are not centered.
enter link description here
EdiT 5: Changing the iframe CSS worked for small resolutions. But for 768x1024 and 800x1280 portrait resolutions texts under pictures exceeds the screen.
part1: 768x1024_part1
part2: 768x1024_part2
Edit 6: The PC/Laptop resolution breaks.
sample
EdiT 7: Carousel starts on the main page automatically on IE 11 but supposed to be sliding on the active page!? Any ideas?
Here is the Jquery:
// Carousel Auto-Cycle
$(document).ready(function () {
$('.carousel').carousel({
interval: 6000
})
});
The solution is not perfect, but I hope it also helps you.
For your container .bannerImage I defined width:100%; than you can achieve the
responsiveness of your website.
#media queries: To set the size of the images to 100%, if the screen resolution is lower than 1024px.
CSS
.bannerImage img {
width: 25%;
}
.bannerImage{
padding-left: 15%;
padding-right: 15%;
width: 100%;
height: auto;
}
.bannerImage iframe{
width: 100%;
}
#media screen and (max-width: 1024px){
.bannerImage img {
width: 100%;
}
}
jsfiddle
EDIT 1
Remove the height: 140px; on line 1430, after than your text will be shown in full height.
EDIT 2 UPDATE
So there was still an issue with the iframe pic, but this should fix it:
CSS
.bannerImage iframe, .video-container object, .video-container embed {
position:absolute;
top:0;
left:0;
width:80%;
height:100%;
}
.iframeImage{
position:relative;
padding-bottom:44.25%;
height:0;
left: -15%; //for centering the iframe
}
HTML
<div class="bannerImage iframeImage">
...
</div>
Have you tried img-responsive class for images and embed-responsive class for video content? these are classes for responsive media content
Check this for images and this for video content