I want my "Navigation"text to appear just next to the icon, but I can't seem to be able to do it.
<nav class="nav-mobile">
<div class="navbar">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<div class="icon"><span class="icon-bar">
</span><span class="icon-bar">
</span><span class="icon-bar">
</span></div> <h3> Navigation</h3></a>
<div class="nav-collapse collapse" aria-expanded="false" style="height: 0px;">
</div></div></div></div>
</nav>
css
.icon-bar {
display: block;
width: 22px;
height: 2px;
border-radius: 1px;
background-color: #6c6d71;
}
nav .btn-navbar
{
display: block;
padding: 10px 15px;
border-top: solid 1px #d7d7d7;
border-bottom: solid 1px #d7d7d7;
}
https://jsfiddle.net/fLhrgw63/1/
Both H3 and the .icon div are block elements which will be 100% width by default. You need to change them to inline-block so that they are only as wide as the content within them.
.icon, h3 {
display:inline-block;
vertical-align:middle;
}
https://jsfiddle.net/fLhrgw63/3/
.icon and h3 are block elements. Making them inline-block should work:
CSS:
.icon {
display: inline-block;
width: 30px;
vertical-align: middle;
}
.nav-title {
display: inline-block;
}
HTML
<h3 class="nav-title">Navigation</h3>
.icon-bar {
display: block;
width: 22px;
height: 2px;
border-radius: 1px;
background-color: #6c6d71;
}
nav .btn-navbar {
display: block;
padding: 10px 15px;
border-top: solid 1px #d7d7d7;
border-bottom: solid 1px #d7d7d7;
}
.icon {
display: inline-block;
width: 30px;
vertical-align: middle;
}
.nav-title {
display: inline-block;
}
<nav class="nav-mobile">
<div class="navbar">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<div class="icon"><span class="icon-bar">
</span><span class="icon-bar">
</span><span class="icon-bar">
</span>
</div>
<h3 class="nav-title"> Navigation</h3>
</a>
<div class="nav-collapse collapse" aria-expanded="false" style="height: 0px;">
</div>
</div>
</div>
</div>
</nav>
Related
Right now I have dropdown menus in a vertical direction like this:
I want to change the dropdown menu so that they appear in a horizontal direction, preferred centered of a menu item:
I am using divs (.dropdown, .dropdown-content)
.dropdown {
float: left;
overflow: hidden;
}
.dropdown .dropbtn {
font-size: 16px;
outline: none;
background-image: linear-gradient(#F1F1F1, #E5E5E5);
font-family: inherit;
margin: 0;
width: 150px;
height: 160px;
border: 1px solid white;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.dropdown-content {
display: none;
position: absolute;
background-image: linear-gradient(#F1F1F1, #E5E5E5);
border: 1px solid white;
width: 150px;
height: auto;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
padding-bottom: 10px;
}
How can I change the direction and alignment?
<div class="dropdown">
<button class="dropbtn" data-showdiv="CO">
<div class="titleh2">Title</div>
<img class="orga" src="picture.png">
<div class="titleh1">Name</div>
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a href="#" class="firstImage">
<img class="orga" src="\untitled.png" />
</a>
<div class="titleh2">Title</div><br>
<div class="titleh3">Name</div>
<hr class="horizontal">
<a href="#">
<img class="orga" src="\untitled.png">
</a>
<div class="titleh2">Title</div><br>
<div class="titleh3">Name</div>
<hr class="horizontal">
<a href="#">
<img class="orga" src="\untitled.png">
</a>
<div class="titleh2">Title</div><br>
<div class="titleh3">Name</div>
</div>
</div>
You can use FlexBox to achieve the wanted result. Keep in mind, that flexbox is farily new and not supported in older browsers.
What I did:
Change the display-setting of dropdown-content to display:flex; and added flex-direction: row to align them horizontally.
Then I wrapped all dropdown-elements with a div to give every element of the dropdown some styling in case of need.
.dropdown {
float: left;
overflow: hidden;
}
.dropdown .dropbtn {
font-size: 16px;
outline: none;
background-image: linear-gradient(#F1F1F1, #E5E5E5);
font-family: inherit;
margin: 0;
width: 150px;
height: 160px;
border: 1px solid white;
border-radius: 5px;
}
.dropdown-content {
/*display: none; //Change this to display flex, with the flex-direction to align the items horizontally*/
display: flex;
flex-direction: row;
position: absolute;
background-image: linear-gradient(#F1F1F1, #E5E5E5);
border: 1px solid white;
height: auto;
border-radius: 5px;
padding-bottom: 10px;
}
.dropdown-content-element{
margin: 2px 5px;
padding: 5px;
}
<div class="dropdown">
<button class="dropbtn" data-showdiv="CO">
<div class="titleh2">Title</div>
<img class="orga" src="picture.png">
<div class="titleh1">Name</div>
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<div class="dropdown-content-element">
<a href="#" class="firstImage">
<img class="orga" src="\untitled.png" />
</a>
<div class="titleh2">Title</div>
<div class="titleh3">Name</div>
</div>
<div class="dropdown-content-element">
<a href="#">
<img class="orga" src="\untitled.png">
</a>
<div class="titleh2">Title</div>
<div class="titleh3">Name</div>
</div>
<div class="dropdown-content-element">
<a href="#">
<img class="orga" src="\untitled.png">
</a>
<div class="titleh2">Title</div>
<div class="titleh3">Name</div>
</div>
</div>
</div>
And here is a little cheatsheet to get you started with FlexBox.
EDIT:
This works, but without being centered on the selected supermenu-item. But you'll achieve that yourself, I trust in you!
Oh and by the way: You can sum up your border-radius rules with border-radius: 5px; if all are the same. Saves some space and maintains better readability.
EDIT 2:
Here is an example of using ul and li to achieve a similar result. This method was suggested by #Moose in one of his comments.
.dropdown {
float: left;
overflow: hidden;
}
.dropdown .dropbtn {
font-size: 16px;
outline: none;
background-image: linear-gradient(#F1F1F1, #E5E5E5);
font-family: inherit;
margin: 0;
width: 150px;
height: 160px;
border: 1px solid white;
border-radius: 5px;
}
.dropdown-content {
/*display: none;*/
position: absolute;
background-image: linear-gradient(#F1F1F1, #E5E5E5);
border: 1px solid white;
height: auto;
border-radius: 5px;
padding-bottom: 10px;
}
.dropdown-list {
list-style: none;
}
.dropdown-list>li {
display: inline-block;
}
<div class="dropdown">
<button class="dropbtn" data-showdiv="CO">
<div class="titleh2">Title</div>
<img class="orga" src="picture.png">
<div class="titleh1">Name</div>
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<ul class="dropdown-list">
<li>
<a href="#" class="firstImage">
<img class="orga" src="\untitled.png" />
</a>
<div class="titleh2">Title</div>
<div class="titleh3">Name</div>
</li>
<li>
<a href="#">
<img class="orga" src="\untitled.png">
</a>
<div class="titleh2">Title</div>
<div class="titleh3">Name</div>
</li>
<li>
<a href="#">
<img class="orga" src="\untitled.png">
</a>
<div class="titleh2">Title</div>
<div class="titleh3">Name</div>
</li>
</ul>
</div>
</div>
I'm trying to use a button in one accordion to expand the next (or another down the line), but the plus and minus sign on the right aren't working properly.
When you click the accordion headings themselves, the plus and minus signs work properly to show if an accordion has been expanded or not. However, it sometimes shows the wrong character after using the buttons inside the accordions.
I don't know enough about CSS yet to figure out why this is happening.
What's going wrong and how can I fix it?
.container {
margin-right: 5px;
margin-left: 5px;
display: inline;
}
.rapanel-group .rapanel-heading+.rapanel-collapse>.rapanel-body {
border: 1px solid #ddd;
}
.rapanel-group,
.rapanel-group .panel,
.rapanel-group .rapanel-heading,
.rapanel-group .rapanel-heading a,
.rapanel-group .rapanel-title,
.rapanel-group .rapanel-title a,
.rapanel-group .rapanel-body,
.rapanel-group .rapanel-group .rapanel-heading+.rapanel-collapse>.rapanel-body {
border-radius: 5px;
border: 0;
margin: 1px 0px 1px 0px;
background-color: #ededed;
}
.rapanel-text {
margin-left: 30px;
margin-right: 30px;
display: inline-block;
font-size: 15px;
}
.rapanel-group .rapanel-heading {
padding: 0px;
}
.rapanel-group .rapanel-heading a {
display: block;
background: #1998d5;
color: #ffffff;
padding: 10px;
text-decoration: none;
position: relative;
border-radius: 5px;
text-align: center;
}
.rapanel-group:hover .rapanel-heading a:hover {
background: #1777a9;
}
.rapanel-group .rapanel-heading a.collapsed {
background: #eeeeee;
color: #ffffff;
background: #1998d5;
text-align: center;
}
.rapanel-group .rapanel-heading a:after {
content: '-';
position: absolute;
right: 20px;
top: 5px;
font-size: 20px;
}
.rapanel-group .rapanel-heading a.collapsed:after {
content: '+';
}
.raabc {
position: absolute;
left: 20px;
}
.rapanel-group .rapanel-collapse {
margin-top: 0px !important;
}
.rapanel-group .rapanel-body {
background: #ededed;
padding: 5px;
}
.rapanel-group .rapanel {
background-color: transparent;
}
.rapanel-group .rapanel-body p:last-child,
.rapanel-group .rapanel-body ul:last-child,
.rapanel-group .rapanel-body ol:last-child {
margin-bottom: 0;
}
/*RA Button Section*/
.rabutton {
display: block;
position: relative;
width: 100%;
background: #ffffff;
border: 1px solid #1998d5;
color: #222222;
font-weight: 500;
font-size: 12px;
text-align: left;
padding: 6px 25px 6px 25px;
border-radius: 5px;
margin: 3px 1px 1px 0px;
}
.rabtnspan {
position: absolute;
color: #1997d5;
right: 10px;
top: 3px;
}
a.rabutton {
text-decoration: none;
}
a.rabutton:hover {
color: #222222;
background: #fffff0;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<div class="container">
<div class="rapanel-group" id="accordionappIssues140">
<div class="panel rapanel-default">
<div class="rapanel-heading">
<h4 class="rapanel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140OneA"><span class="raabc"></span><span class="rapanel-text">
a
</span></a></h4>
</div>
<div id="collapseappIssues140OneA" class="rapanel-collapse collapse">
<div class="rapanel-body">
<div class="ratooltip">
<a class="rabutton" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140TwoB"><span class="rabtnspan">➜</span>Button</a>
</div>
</div>
</div>
</div>
<div class="panel rapanel-default">
<div class="rapanel-heading">
<h4 class="rapanel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140TwoB"><span class="raabc"></span><span class="rapanel-text">
b
</span></a></h4>
</div>
<div id="collapseappIssues140TwoB" class="rapanel-collapse collapse">
<div class="rapanel-body">
<div class="ratooltip">
<a class="rabutton" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140ThreeC"><span class="rabtnspan">➜</span>Button</a>
</div>
</div>
</div>
</div>
<div class="panel rapanel-default">
<div class="rapanel-heading">
<h4 class="rapanel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140ThreeC"><span class="raabc"></span><span class="rapanel-text">
c
</span></a></h4>
</div>
<div id="collapseappIssues140ThreeC" class="rapanel-collapse collapse">
<div class="rapanel-body">
<div class="ratooltip">
<a class="rabutton" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140FourD"><span class="rabtnspan">➜</span>Button</a>
</div>
</div>
</div>
</div>
<div class="panel rapanel-default">
<div class="rapanel-heading">
<h4 class="rapanel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140FourD"><span class="raabc"></span><span class="rapanel-text">
d
</span></a></h4>
</div>
<div id="collapseappIssues140FourD" class="rapanel-collapse collapse">
<div class="rapanel-body">
<div class="ratooltip">
<a class="rabutton" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140FiveE"><span class="rabtnspan">➜</span>Button</a>
</div>
</div>
</div>
</div>
<div class="panel rapanel-default">
<div class="rapanel-heading">
<h4 class="rapanel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140FiveE"><span class="raabc"></span><span class="rapanel-text">
e
</span></a></h4>
</div>
<div id="collapseappIssues140FiveE" class="rapanel-collapse collapse">
<div class="rapanel-body">
<div class="ratooltip">
<a class="rabutton" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140OneA"><span class="rabtnspan">➜</span>Button</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
View on JSFiddle
I've been having a hard time getting the hamburger menu to work onnce the screen size decreases to anything below 1200px. How can I get my list items to show up below my top nav bar?
This is what I have so far:
.mainBackground {
background-image: url('https://res.cloudinary.com/knaguibimages/image/upload/o_65/v1474765365/Background_p3qqpv.jpg');
background-repeat: no-repeat;
background-size: cover;
position: relative;
}
#media screen and (min-width: 1200px) {
.body-wrapper {
padding-left: 80px;
}
}
#media screen and (min-width: 1200px) {
.navbar {
width: 80px;
max-width: 80px;
position: fixed;
top: 0;
left: 0;
height: 100%;
border: 0;
border-radius: 0;
text-align: center;
}
}
.navbar {
z-index: 10000;
background: rgba(30, 30, 31, 0.85);
}
#media screen and (max-width: 1200px) {
.navbar-header {
float: left;
padding: 0 40px;
}
}
.navbar-brand {
padding: 50px 0 50px 25px;
float: left;
height: auto;
}
#media screen and (min-width: 1200px) {
.navbar-brand {
position: relative;
box-shadow: none;
margin: 12px 0;
}
}
ul li a span {
display: inline-block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
transition: 0.3s;
font-size: 17px;
}
.btn.responsive-menu {
display: none;
}
#media screen and (max-width: 1200px) {
.btn.responsive-menu {
margin: 45px 50px 0 0;
display: inline-block;
float: right;
}
}
.btn {
color: #0067b5;
background: none;
border: 2px solid;
-webkit-transition: all 200ms ease-in;
}
.current {
color: white;
}
section {
padding-top: 50px;
padding-left: 50px;
padding-right: 70px;
margin-bottom: 106px;
}
section .box {
padding: 50px;
background-color: rgba(0, 0, 0, 0.75);
}
.section-title {
margin-bottom: 20px;
font-size: 22px;
line-height: 28px;
color: white;
}
#aboutMe-responsive {
display: none;
}
#myPortfolio-responsive {
display: none;
}
#contactMe-responsive {
display: none;
}
#aboutMe {
padding: 0 50px 20px 0;
}
#myPortfolio {
padding: 0 50px 20px 0;
}
#contactMe {
padding: 0 50px 20px 0;
}
#media screen and (max-width: 1200px) {
#aboutMe {
display: none;
}
#myPortfolio {
display: none;
}
#contactMe {
display: none;
}
#aboutMe-responsive {
display: inline;
}
#myPortfolio-responsive {
display: inline;
}
#contactMe-responsive {
display: inline;
}
}
.frame {
position: relative;
border: 4px solid;
border-color: rgba(0, 0, 0, 0.5);
overflow: hidden;
margin: 0 0 15px 0;
}
p {
font-size: 15px;
line-height: 30px;
letter-spacing: 0.3px;
color: white;
}
<!--Navigation- Bar-->
<nav class="navbar navbar-default" role="navigation">
<!--Navbar header-->
<div class="navbar-header">
<!-- Logo -->
<div class="navbar-brand text-center">
<!-- <a href="#"> -->
<i id="home" class="fa fa-home fa-2x"></i>
<!-- </a> -->
</div>
</div>
<!--Hamburger menu-->
<a class="btn responsive-menu" data-toggle="collapse" data-target=".navbar-collapse">
<i id="hamburger-menu" class="fa fa-bars fa-2x"></i>
</a>
<!--Navbar Icon Section Navigation-->
<!-- Add "in" when you want to collapse nav bar -->
<div id="nav-section-selection" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<!--About Me-->
<li>
<a href="#about">
<i id="aboutMe" class="fa fa-user fa-2x current"></i>
<span id="aboutMe-responsive">ABOUT ME</span>
</a>
</li>
<!--Portfolio-->
<li>
<a href="#portfolio">
<i id="myPortfolio" class="fa fa-briefcase fa-2x"></i>
<span id="myPortfolio-responsive">MY WORK</span>
</a>
</li>
<!--Contact-->
<li>
<a href="#contact">
<i id="contactMe" class="fa fa-envelope-o fa-2x"></i>
<span id="contactMe-responsive">CONTACT ME</span>
</a>
</li>
</ul>
</div>
</nav>
<!--Page Content Starts Here-->
<div id="pageContent">
<!-- About Me Section -->
<section id="about" class="about-section">
<div class="box">
<h2 class="section-title">A Little About Myself</h2>
<div class="row">
<div class="col-md-5 col-md-push-7">
<figure class="frame">
<img class="img-responsive about-me-img" src="https://res.cloudinary.com/knaguibimages/image/upload/v1474765942/ProfilePic_bvn1gs.jpg" alt="Karim Naguib Profile Picture">
</figure>
</div>
<div class="col-md-7 col-md-pull-5">
<p>Hello! My name's Karim Naguib, and this page was developed to showcase my coding talent.</p>
<p>I graduated from the University of Waterloo in 2015, with a degree in Management Engineering.</p>
</div>
</div>
</div>
</section>
<!-- Portfolio Section -->
<section id="portfolio" class="portfolio-section">
<div class="box">
<h2 class="section-title">My Work</h2>
</div>
</section>
<!-- Contact Section -->
<section id="contact" class="contact-section">
<div class="box">
<h2 class="section-title">Get In Touch With Me</h2>
</div>
</section>
</div>
</div>
<!-- Footer -->
</body>
</html>
you should try this inside your navbar-header class:
<button type="button" class="navbar-toggle"
data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
I'm having trouble keeping my navbar responsive. When the browser reaches a certain size, the height will increase. I made a fiddle to show what is happening, if you expand the preview, the navbar will be normal.
http://jsfiddle.net/x70r23cn/
.navbar {
background-color: #204489;
box-shadow: 0 4px 8px rgba(0,0,0,.25);
float: center;
}
.navbar a {
color: #fff;
}
.navbar-brand img {
margin-left: auto;
margin-right: auto;
height: 25px;
}
.navbar-brand {
margin-left: auto !important;
margin-right: auto !important;
display: block !important;
float: none !important;
}
<nav class='navbar navbar-fixed-top'>
<div class='container'>
<div class='navbar-header'>
<button aria-controls='navbar' aria-expanded='false' class='navbar-toggle collapsed' data-target='#navbar' data-toggle='collapse' type='button'>
<span class='sr-only'>Toggle navigation</span>
<span class='icon-bar'></span>
<span class='icon-bar'></span>
<span class='icon-bar'></span>
</button>
</div>
<div class='navbar-brand'>
<img src="https://placeholdit.imgix.net/~text?txtsize=33&txt=350%C3%97150&w=271&h=25" />
</div>
</div>
</nav>
Remove the navbar-header class as it's designed to enable the collapse menu on mobile devices; that's why the navbar is expanding.
See example Snippet.
.navbar.navbar-custom {
background-color: #204489;
box-shadow: 0 4px 8px rgba(0, 0, 0, .25);
float: center;
}
.navbar.navbar-custom a {
color: #fff;
}
.navbar.navbar-custom .navbar-brand {
margin-left: auto;
margin-right: auto;
display: block;
float: none;
}
.navbar.navbar-custom .navbar-brand img {
margin-left: auto;
margin-right: auto;
height: 25px;
margin-top: -2px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<nav class='navbar navbar-custom navbar-fixed-top'>
<div class='container'>
<div class='navbar-brand'>
<img src="https://placeholdit.imgix.net/~text?txtsize=33&txt=350%C3%97150&w=271&h=25" />
</div>
</div>
</nav>
try this... the navbar-brand needs to be in the navbar-header and the navbar-brand needs to be inline or inline-block.
.navbar {
background-color: #204489;
box-shadow: 0 4px 8px rgba(0,0,0,.25);
float: center;
}
.navbar a {
color: #fff;
}
.navbar-brand img {
margin-left: auto;
margin-right: auto;
height: 25px;
}
.navbar-brand {
margin-left: auto !important;
margin-right: auto !important;
display: block !important;
float: none !important;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<nav class="navbar navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button aria-controls="navbar" aria-expanded="false" class="navbar-toggle collapsed" data-target="#navbar" data-toggle="collapse" type="button">
<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">
<img src="https://placeholdit.imgix.net/~text?txtsize=33&txt=350%C3%97150&w=271&h=25" />
</a>
</div>
</div>
<nav>
I'm trying to make a vertical line between my div.
I want to my line to fit the whole height of the div, I couldn't get to do that.
I've tried border-right, and border-left of the next div.
Here is my my results
border-right
border-left of the next div
Can someone please show me the best way to accomplish this ?
Thanks in advance.
CODE
<style type="text/css">
.panel {
border-radius: 0px !important;
background-color: #4D8FCB;
color: white;
margin-left: 25px;
margin-right: 25px;
}
.panel-heading {
height: 114px;
}
.panel-body {
font-size: 10px;
background-color: white;
}
.sa-h1 {
color: white;
font-size: 39px;
font-weight: bold;
font-style: normal;
font-family: "adelle-sans", sans-serif;
}
.sa-h2{
font-size: 28px;
}
.sa-h3{
font-size: 16px;
}
.sa-h4{
font-size: 14px;
}
.sa-h5{
font-size: 12px;
}
.sa-h6{
font-size: 10px;
}
.sa-right-items{
float: left;
/*line-height: 114px;*/
}
.sa-answer, .sa-score, .sa-review, .sa-report {
vertical-align: middle;
display: inline-block;
padding: 5px 22px;
}
</style>
<br><br>
<div class="row student-accordion ">
<div class="col-md-12">
<div class="panel-group" id="accordion">
<div class="panel">
<div class="row panel-heading">
<div class="panel-title">
<div class="col-xs-1 sa-section" >
<p><span class="sa-h5">SECTION</span>
<br>
<span id="sa-section-num" class="sa-h1">2.2</span>
<br><span class="sa-h5">EXERCISE</span>
</p>
</div>
<!-- Title -->
<div class="col-xs-6 col-lg-6" style="border-left: 2px solid white;" >
<span class="sa-h3">Section Exercise 2.2</span><br>
<span class="sa-h5">ALGEBRA 1</span> <br>
<span class="sa-h4">02/09/2015</span>
</div>
<!-- Answers -->
<div class="sa-right-items text-center">
<span class="sa-answer">
<span> <span class="sa-h2">11/25</span> <br> <span class="sa-h6">ITEMS ANSWERED <br> CORRECTLY</span> </span>
</span>
<!-- Score -->
<span class="sa-score">
<span> <span class="sa-h2">44%</span> <br> <span class="sa-h6">SCORE</span> </span>
</span>
<!-- Review -->
<span class="sa-review">
<img width="40px" src="/BIM/resources/images/icons-report/review_white.png"><br>
<span> <span class="sa-h6">REVIEW</span> </span>
</span>
<!-- Report -->
<span class="sa-report">
<span data-toggle="collapse" data-parent="#accordion" href="#student-accordion-collapse" class="pull-right">
<img width="40px" src="/BIM/resources/images/icons-report/report_white.png"><br>
<span> <span class="sa-h6">VIEW REPORT</span> </span>
</span>
</span>
</div>
</div>
</div>
<div id="student-accordion-collapse" class="panel-collapse collapse">
<div class="panel-body">
Contents
</div>
</div>
</div>
</div>
</div>
</div>
JSFiddle
Remove the border style from .col-xs-6 col-lg-6, then:
.col-xs-1 sa-section {
border-right: 2px solid #fff;
margin-top: -11px;
padding-top: 11px;
}
Basically the border will show up within padding, so you just need to move the container up a bit (using a negative margin-top) and add some padding so the text shows up in the same place.
You will probably want to add an ID to the container and target it in CSS that way, instead of defining the styles of the class.
JSFiddle
Please check the fiddle - http://jsfiddle.net/onms9kcu/3/
border inline style removed, and added the below style.
.sa-section:after{
border-right: 2px solid white;
content: "";
display: block;
width: 1px;
position: absolute;
bottom: -10px;
top: -10px;
right: 0;
}