Currently working on a cursor that shows text in a div when hovering over it and hides the rest of the div with box-shadow. My problem is that the box-shadow is covering my whole page and I only want to cover the div where the text is showed.
I've tried fixing this with z-index but I think it's not a good idea to give every element a position with a z-index. So I've been trying to use position relative which doens't hide the rest of the page but then it won't be showing the text when hovering on it.
It's suppose to do this when hovering over it with the cursor with out covering the rest like the second picture
But then it won't show the text when I put in position: relative; in .test
.container .pageBlock .googleBlock {
width: 1100px;
margin: 0 auto;
padding: 0 30px;
max-width: 100%;
box-sizing: border-box;
cursor: url(../img/vergrootglas.png) 55 30, auto;
}
.container .pageBlock .googleBlock .title {
font-size: 14px;
font-weight: 200;
margin-left: 40px;
}
.container .pageBlock .googleBlock .test {
overflow: hidden;
position: relative;
}
.container .pageBlock .googleBlock .test .cursor {
position: absolute;
z-index: 1;
background: transparent;
width: 35px;
height: 35px;
opacity: 0.9;
border-radius: 50%;
box-shadow: 0 0 0 9999px #2D2D2D;
}
.container .pageBlock .googleBlock .test #maskOverlay {
width: 100%;
height: 100%;
}
.container .pageBlock .googleBlock .test .wrapper {
list-style: none;
display: inline-block;
width: 33%;
position: relative;
}
.container .pageBlock .googleBlock .test .wrapper .list ul {
list-style: none;
}
.container .pageBlock .googleBlock .test .wrapper .list ul > li:before {
content: "- ";
}
.container .pageBlock .googleBlock .test .wrapper .list li {
line-height: 28px;
}
<section class="googleBlock">
<h1 class='title'>Oh ja, en voor <strong>Google</strong>, voor als je mee leest...</h1>
<div class="test">
<div id="maskOverlay">
<div class="wrapper">
<div class="list">
<ul>
<li>Website laten maken</li>
<li>Online marketing bureau</li>
<li>Website maker</li>
<li>Website bouwen</li>
<li>Webdesign</li>
<li>Digital agency</li>
<li>Websites</li>
</ul>
</div>
</div>
<div class="wrapper">
<div class="list">
<ul>
<li>Grafisch ontwerper</li>
<li>Serious Game</li>
<li>Design bureau</li>
<li>Grafisch vormgever</li>
<li>Interactief</li>
<li>Kwaliteit</li>
<li>Interactieve communicatie</li>
</ul>
</div>
</div>
<div class="wrapper">
<div class="list">
<ul>
<li>Digital awesomeness</li>
<li>Custom website</li>
<li>Gaming</li>
<li>Technologie</li>
<li>Strategie</li>
<li>Branding</li>
<li>Digitale campagnes</li>
</ul>
</div>
</div>
</div>
<div class="cursor"></div>
</div>
</section>
Is it something like this you want?
.list:hover {
background-color: grey;
}
.points:hover {
color: white;
}
<section class="googleBlock">
<h1 class='title'>Oh ja, en voor <strong>Google</strong>, voor als je mee leest...</h1>
<div class="test">
<div id="maskOverlay">
<div class="wrapper">
<div class="list">
<ul>
<li class="points">Website laten maken</li>
<li class="points">Online marketing bureau</li>
<li class="points">Website maker</li>
<li class="points">Website bouwen</li>
<li class="points">Webdesign</li>
<li class="points">Digital agency</li>
<li class="points">Websites</li>
</ul>
</div>
</div>
<div class="wrapper">
<div class="list">
<ul>
<li class="points">Grafisch ontwerper</li>
<li class="points">Serious Game</li>
<li class="points">Design bureau</li>
<li class="points">Grafisch vormgever</li>
<li class="points">Interactief</li>
<li class="points">Kwaliteit</li>
<li class="points">Interactieve communicatie</li>
</ul>
</div>
</div>
<div class="wrapper">
<div class="list">
<ul>
<li class="points">Digital awesomeness</li>
<li class="points">Custom website</li>
<li class="points">Gaming</li>
<li class="points">Technologie</li>
<li class="points">Strategie</li>
<li class="points">Branding</li>
<li class="points">Digitale campagnes</li>
</ul>
</div>
</div>
</div>
<div class="cursor"></div>
</div>
</section>
This should do the trick
.container .pageBlock .googleBlock {
width: 1100px;
margin: 0 auto;
padding: 0 30px;
max-width: 100%;
box-sizing: border-box;
cursor: url(../img/vergrootglas.png) 55 30, auto;
}
.container .pageBlock .googleBlock .title {
font-size: 14px;
font-weight: 200;
margin-left: 40px;
}
.container .pageBlock .googleBlock .test {
overflow: hidden;
position: relative;
}
.container .pageBlock .googleBlock .test .cursor {
position: absolute;
z-index: 1;
background: transparent;
width: 35px;
height: 35px;
opacity: 0.9;
border-radius: 50%;
box-shadow: 0 0 0 9999px #2D2D2D;
}
.container .pageBlock .googleBlock .test #maskOverlay {
width: 100%;
height: 100%;
}
.container .pageBlock .googleBlock .test .wrapper {
list-style: none;
display: inline-block;
width: 33%;
position: relative;
}
.container .pageBlock .googleBlock .test .wrapper .list ul {
list-style: none;
}
.container .pageBlock .googleBlock .test .wrapper .list ul > li:before {
content: "- ";
}
.container .pageBlock .googleBlock .test .wrapper .list li {
line-height: 28px;
}
.list{
transition: all 1s ease;
}
.list:hover{
box-shadow: 0 0 0 9999px #2D2D2D;
}
<section class="googleBlock">
<h1 class='title'>Oh ja, en voor <strong>Google</strong>, voor als je mee leest...</h1>
<div class="test">
<div id="maskOverlay">
<div class="wrapper">
<div class="list">
<ul>
<li>Website laten maken</li>
<li>Online marketing bureau</li>
<li>Website maker</li>
<li>Website bouwen</li>
<li>Webdesign</li>
<li>Digital agency</li>
<li>Websites</li>
</ul>
</div>
</div>
<div class="wrapper">
<div class="list">
<ul>
<li>Grafisch ontwerper</li>
<li>Serious Game</li>
<li>Design bureau</li>
<li>Grafisch vormgever</li>
<li>Interactief</li>
<li>Kwaliteit</li>
<li>Interactieve communicatie</li>
</ul>
</div>
</div>
<div class="wrapper">
<div class="list">
<ul>
<li>Digital awesomeness</li>
<li>Custom website</li>
<li>Gaming</li>
<li>Technologie</li>
<li>Strategie</li>
<li>Branding</li>
<li>Digitale campagnes</li>
</ul>
</div>
</div>
</div>
<div class="cursor"></div>
</div>
</section>
.list{
transition: all 1s ease;
}
.list:hover{
box-shadow: 0 0 0 9999px #2D2D2D;
}
Related
Fixed div is getting down when I give margin-top to the div below it...why?
* {
margin: 0;
padding: 0;
}
.header_bg {
width: 100%;
height: 100px;
position: fixed;
background: black
}
.container {
width: 960px;
height: auto;
margin: 0 auto
}
ul.menu {
list-style: none;
}
ul.menu li {
display: inline-block
}
ul.menu li a {
text-decoration: none;
color: white
}
.content {
margin-top: 140px
}
<div class="header_bg">
<div class="container">
<ul class="menu">
<li>Home
</li>
<li>About
</li>
<li>Service
</li>
<li>Contact
</li>
</ul>
</div>
</div>
<div class="container">
<div class="content">
/* Content Goes here*/
</div>
</div>
you need to add top:0 to your .header_bg, see more about position
* {
margin: 0;
padding: 0;
}
.header_bg {
width: 100%;
height: 100px;
position: fixed;
background: black;
top:0
}
.container {
width: 960px;
height: auto;
margin: 0 auto
}
ul.menu {
list-style: none;
}
ul.menu li {
display: inline-block
}
ul.menu li a {
text-decoration: none;
color: white
}
.content {
margin-top: 140px
}
<div class="header_bg">
<div class="container">
<ul class="menu">
<li>Home
</li>
<li>About
</li>
<li>Service
</li>
<li>Contact
</li>
</ul>
</div>
</div>
<div class="container">
<div class="content">
/* Content Goes here*/
</div>
</div>
I'm having some issues with one of my div. The page is set to full screen top to bottom left to right and everything is fine until I start adding some content into the div "top_nav" which seems to push the entire "header_wrapper" downward. My CSS will tell you everything thats going on as well.
<div id="wrapper">
<!-- header Section -->
<div id="header_wrapper">
<div id="header_content">
<div id="top_nav">
<ul>
<li class="cg">Login/Register</li>
<li class="cg">Shopping</li>
<li>
<form action="http://www.example.com/login/">
<input name="search" placeholder="Enter keyword" type="search"><input type="submit" value="Search">
</form>
</li>
</ul>
</div>
<div id="logo"></div>
<div id="bottom_nav">
<ul>
<li class="cg">
News
</li>
<li class="cg">
Videos
</li>
<li class="cg">
Photography
</li>
<li class="cg">
Our Magazine
</li>
<li class="cg">
Environment
</li>
<li class="cg">
Travel
</li>
<li class="cg">
Kids
</li>
<li class="cg">
Television
</li>
</ul>
</div>
</div>
</div>
</div>
#html,body {
margin: 0;
padding: 0;
}
#wrapper {
margin: 0 auto;
padding: 0;
background-color: #DDDAD4;
}
#header_wrapper {
width: 100%;
height: 110px;
background-color: #383838;
overflow: hidden;
}
#header_content {
width: 1000px;
height: 110px;
background-color: #ffc0cb;
margin: auto;
}
#top_nav {
width: 1000px;
height: 30px;
background-color: green;
}
#top_nav li {
display: inline;
color: #fff;
}
#logo {
width: 80px;
height: 80px;
background-color: #000;
float: left;
}
#bottom_nav {
width: 920px;
height: 80px;
background-color: red;
float: right;
}
#bottom_nav li {
display: inline;
}
#bottom_nav a {
color: #fff;
}
Looks like it's because of the margin in your <ul>. Here's a JSFiddle where I removed the margins: https://jsfiddle.net/jameson5555/wrzLcz3L/
ul {
margin: 0;
}
i want to add drop-down list for every menu but its showing only for "Products". Firstly i made drop-down list only for "Products" menu.But for others menu its not working.
Html code is:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Welcome to Cctvcart store</title>
<link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<body>
<div class="header_wrap">
<div class="header_top_wrap">
<div class="header_top">
</div>
</div>
<!--end of header top wrap -->
<div class="header_bottom_wrap">
<div class="header_bottom">
<ul class="bottom_menu">
<li class="dropdown"><li>Company
<ul class="submenu">
<li>About us
</li>
<li>New Realeses
</li>
<li>Contact us
</li>
</ul>
</li>
<li class="dropdown">Products
<ul class="submenu">
<li>DVR & Kits
</li>
<li>Seurity Cameras
</li>
<li>Spy Camreas</li>
<li>Wireless & IP Cameras</li>
<li>Accessories</li>
<li>Mini Video</li>
</ul>
</li>
<li>Services
</li>
<li class="dropdown"><li>Support
<ul class="submenu">
<li>Support Home
</li>
<li>Warranty
</li>
<li>Feedback
</li>
<li>Contact Tech Support
</li>
</li>
<li class="dropdown"> <li>Multimedia
<ul class="submenu">
<li>Video
</li>
<li>Podcasts
</li>
</li>
</ul>
</div>
</div>
<!--end of bottom wrap -->
</div>
<!--end of header wrap -->
<div class="main_wrap">
<div class="main">
</div>
<!--end of main -->
</div>
<!--end of main wrap -->
<div class="footer_wrap">
<footer></footer>
</div>
<!--end of footer wrap -->
</body>
</html>
style.css:
* {
margin: 0px;
padding: 0px;
}
.header_wrap {
width: 100%;
height: 160px;
background: red;
position: relative;
}
.main_wrap {
width: 100%;
height: 1475px;
background: green;
}
.footer_wrap {
width: 100%;
height: 325px;
background: aqua;
}
.main {
width: 1000px;
height: 100%;
background: blue;
margin: auto;
}
footer {
width: 1000px;
height: 100%;
background: aqua;
margin: auto;
}
.header_top_wrap {
width: 100%;
height: 23px;
background: #ccc;
}
.header_bottom_wrap {
width: 100%;
height: 40px;
background: #06F;
position: absolute;
bottom: 0px;
left: 0px;
}
.header_top {
width: 1000px;
height: 100%;
background: purple;
margin: auto;
}
.header_bottom {
width: 1000px;
height: 100%;
background: black;
margin: auto;
}
.bottom_menu > li {
display: inline-block;
}
.bottom_menu a
{
font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", "Arial Black", sans-serif;
color: #fff;
}
.bottom_menu > li >a {
display: block;
text-decoration: none;
padding: 0px 30px;
height: 40px;
line-height: 35px;
text-align: center;
}
.bottom_menu > li:hover >a
{
background:#fff;
color:#151716;
}
.submenu a:active, .submenu a:visited{
display: block;
color: #fff;
text-decoration: none;
z-index: 21;
}
.submenu {
position: absolute;
display: none;
width:160px;
height:250px;
background:white;
list-style:none;
}
.dropdown:hover > .submenu{
display: block;
}
.submenu>li>a
{
display:block;
width:100%;
height:42px;
background:black;
text-decoration:none;
line-height:58px;
padding-left:50px;
border:1px dashed white;
}
The issue is here:
<li class="dropdown"><li>Company
You have two <li>s. Please remove one. Also you forgot to include this after the </ul>:
</li>
</ul>
</li>
</ul>
Here's a working snippet:
* {
margin: 0px;
padding: 0px;
}
.header_wrap {
width: 100%;
height: 160px;
background: red;
position: relative;
}
.main_wrap {
width: 100%;
height: 1475px;
background: green;
}
.footer_wrap {
width: 100%;
height: 325px;
background: aqua;
}
.main {
width: 1000px;
height: 100%;
background: blue;
margin: auto;
}
footer {
width: 1000px;
height: 100%;
background: aqua;
margin: auto;
}
.header_top_wrap {
width: 100%;
height: 23px;
background: #ccc;
}
.header_bottom_wrap {
width: 100%;
height: 40px;
background: #06F;
position: absolute;
bottom: 0px;
left: 0px;
}
.header_top {
width: 1000px;
height: 100%;
background: purple;
margin: auto;
}
.header_bottom {
width: 1000px;
height: 100%;
background: black;
margin: auto;
}
.bottom_menu > li {
display: inline-block;
}
.bottom_menu a
{
font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", "Arial Black", sans-serif;
color: #fff;
}
.bottom_menu > li >a {
display: block;
text-decoration: none;
padding: 0px 30px;
height: 40px;
line-height: 35px;
text-align: center;
}
.bottom_menu > li:hover >a
{
background:#fff;
color:#151716;
}
.submenu a:active, .submenu a:visited{
display: block;
color: #fff;
text-decoration: none;
z-index: 21;
}
.submenu {
position: absolute;
display: none;
width:160px;
background:white;
list-style:none;
}
.dropdown:hover > .submenu{
display: block;
}
.submenu>li>a
{
display:block;
width:100%;
height:42px;
background:black;
text-decoration:none;
line-height:58px;
padding-left:50px;
border:1px dashed white;
}
<div class="header_wrap">
<div class="header_top_wrap">
<div class="header_top">
</div>
</div>
<!--end of header top wrap -->
<div class="header_bottom_wrap">
<div class="header_bottom">
<ul class="bottom_menu">
<li class="dropdown">Company
<ul class="submenu">
<li>About us</li>
<li>New Realeses</li>
<li>Contact us</li>
</ul>
</li>
<li class="dropdown">Products
<ul class="submenu">
<li>DVR & Kits</li>
<li>Seurity Cameras</li>
<li>Spy Camreas</li>
<li>Wireless & IP Cameras</li>
<li>Accessories</li>
<li>Mini Video</li>
</ul>
</li>
<li>Services</li>
<li class="dropdown">
Support
<ul class="submenu">
<li>Support Home</li>
<li>Warranty</li>
<li class="dropdown">
Multimedia
<ul class="submenu">
<li>Video</li>
<li>Podcasts</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!--end of bottom wrap -->
</div>
<!--end of header wrap -->
<div class="main_wrap">
<div class="main">
</div>
<!--end of main -->
</div>
<!--end of main wrap -->
<div class="footer_wrap">
<footer></footer>
</div>
<!--end of footer wrap -->
Just take down the <li>, because you did it twice.
here is a working Jsfiddle https://jsfiddle.net/v7dLps8b/
In my project
{"company","products","service","support","multimedia"}
should be left side of the content area where green color is and while clicking any of these link like
{"company","products","service","support","multimedia"}
Its drop down menu should come on right hand side
<div class="header_wrap">
<div class="header_top_wrap">
<div class="header_top">
</div>
</div>
<!--end of header top wrap -->
<div class="header_bottom_wrap">
<div class="header_bottom">
<ul class="bottom_menu">
<li class="dropdown">Company
<ul class="submenu">
<li>About Cctvcart</li>
<li>New Releases</li>
<li>Contact us</li>
</ul>
</li>
<li class="dropdown">Products
<ul class="submenu">
<li>DVR & Kits</li>
<li>Seurity Cameras</li>
<li>Spy Camreas</li>
<li>Wireless & IP Cameras</li>
<li>Accessories</li>
<li>Mini Video</li>
</ul>
</li>
<li class="dropdown">Services
<ul class="submenu">
<li>Warranty Registration</li>
<li>Professional Installation</li>
</ul>
</li>
<li class="dropdown">Support
<ul class="submenu">
<li>Support Home</li>
<li>Support Center</li>
<li>Customer Feedback</li>
<li>Contact Tech Support</li>
<li>DVR DDNS Portal</li>
</ul>
</li>
<li class="dropdown">Multimedia
<ul class="submenu">
<li>Cctvcart Videos</li>
<li>Podcasts</li>
<li>Video Instruction Guides</li>
</ul>
</li>
</ul>
</div>
</div>
<!--end of bottom wrap -->
</div>
<!--end of header wrap -->
<div class="main_wrap">
<div class="main">
</div>
<!--end of main -->
</div>
<!--end of main wrap -->
<div class="footer_wrap">
<footer></footer>
</div>
CSS-
* {
margin: 0px;
padding: 0px;
}
.header_wrap {
width: 100%;
height: 160px;
background: red;
position: relative;
}
.main_wrap {
width: 100%;
height: 1475px;
background: green;
}
.footer_wrap {
width: 100%;
height: 325px;
background: aqua;
}
.main {
width: 1000px;
height: 100%;
background: blue;
margin: auto;
}
footer {
width: 1000px;
height: 100%;
background: aqua;
margin: auto;
}
.header_top_wrap {
width: 100%;
height: 23px;
background: #ccc;
}
.header_bottom_wrap {
width: 100%;
height: 40px;
background: #06F;
position: absolute;
bottom: 0px;
left: 0px;
}
.header_top {
width: 1000px;
height: 100%;
background: purple;
margin: auto;
}
.header_bottom {
width: 1000px;
height: 100%;
background: black;
margin: auto;
}
.bottom_menu > li {
/*display: inline-block;*/
display : list-item;
}
.bottom_menu a
{
font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", "Arial Black", sans-serif;
color: #fff;
}
.bottom_menu > li >a {
display: block;
text-decoration: none;
padding: 0px 30px;
height: 40px;
line-height: 35px;
text-align: center;
}
.bottom_menu > li:hover >a
{
background:#fff;
color:#151716;
}
.submenu a:active, .submenu a:visited{
display: block;
color: #fff;
text-decoration: none;
z-index: 21;
}
.submenu {
/*position: absolute;
display: none;
width:200px;
height:auto;
background:white;
list-style:none;*/
position: absolute;
margin: 0 auto;
left: calc(30% - 50px);
display: none;
width: 200px;
height: auto;
background: #FFF;
list-style: none;
}
.dropdown:hover > .submenu{
display: block;
}
.submenu>li>a
{
display:block;
width:100%;
height:42px;
background:black;
text-decoration:none;
line-height:58px;
padding-left:20px;
border:1px dashed white;
}
add position:relative to .bottom_menu
* {
margin: 0px;
padding: 0px;
}
.header_wrap {
width: 100%;
height: 160px;
background: red;
position: relative;
}
.main_wrap {
width: 100%;
height: 1475px;
background: green;
}
.footer_wrap {
width: 100%;
height: 325px;
background: aqua;
}
.main {
width: 1000px;
height: 100%;
background: blue;
margin: auto;
}
footer {
width: 1000px;
height: 100%;
background: aqua;
margin: auto;
}
.header_top_wrap {
width: 100%;
height: 23px;
background: #ccc;
}
.header_bottom_wrap {
width: 100%;
height: 40px;
background: #06F;
position: absolute;
bottom: 0px;
left: 0px;
}
.header_top {
width: 1000px;
height: 100%;
background: purple;
margin: auto;
}
.header_bottom {
width: 1000px;
height: 100%;
background: black;
margin: auto;
}
.bottom_menu {
list-style: none;
position: relative;
}
.bottom_menu > li {
/*display: inline-block;*/
display: list-item;
}
.bottom_menu a {
font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", "Arial Black", sans-serif;
color: #fff;
}
.bottom_menu > li >a {
display: block;
text-decoration: none;
padding: 0px 30px;
height: 40px;
line-height: 35px;
text-align: center;
}
.bottom_menu > li:hover >a {
background: #fff;
color: #151716;
}
.submenu a:active,
.submenu a:visited {
display: block;
color: #fff;
text-decoration: none;
z-index: 21;
}
.submenu {
/*position: absolute;
display: none;
width:200px;
height:auto;
background:white;
list-style:none;*/
position: absolute;
/* margin: 0 auto; */
/* left: calc(30% - 50px); */
right: calc(20% - 50px);
display: none;
width: 200px;
height: auto;
background: #FFF;
list-style: none;
}
.dropdown:hover > .submenu {
display: block;
}
.submenu>li>a {
display: block;
width: 100%;
height: 42px;
background: black;
text-decoration: none;
line-height: 58px;
padding-left: 20px;
border: 1px dashed white;
}
<div class="header_wrap">
<div class="header_top_wrap">
<div class="header_top">
</div>
</div>
<!--end of header top wrap -->
<div class="header_bottom_wrap">
<div class="header_bottom">
<ul class="bottom_menu">
<li class="dropdown">Company
<ul class="submenu">
<li>About Cctvcart</li>
<li>New Releases</li>
<li>Contact us</li>
</ul>
</li>
<li class="dropdown">Products
<ul class="submenu">
<li>DVR & Kits</li>
<li>Seurity Cameras</li>
<li>Spy Camreas</li>
<li>Wireless & IP Cameras</li>
<li>Accessories</li>
<li>Mini Video</li>
</ul>
</li>
<li class="dropdown">Services
<ul class="submenu">
<li>Warranty Registration</li>
<li>Professional Installation</li>
</ul>
</li>
<li class="dropdown">Support
<ul class="submenu">
<li>Support Home</li>
<li>Support Center</li>
<li>Customer Feedback</li>
<li>Contact Tech Support</li>
<li>DVR DDNS Portal</li>
</ul>
</li>
<li class="dropdown">Multimedia
<ul class="submenu">
<li>Cctvcart Videos</li>
<li>Podcasts</li>
<li>Video Instruction Guides</li>
</ul>
</li>
</ul>
</div>
</div>
<!--end of bottom wrap -->
</div>
<!--end of header wrap -->
<div class="main_wrap">
<div class="main">
</div>
<!--end of main -->
</div>
<!--end of main wrap -->
<div class="footer_wrap">
<footer></footer>
</div>
Hello I have three columns that need a right border with a fixed height, not depending on the number of items in the column.
My code
html
<div class="col-sm-2">
<div class="footer-col">
<ul>
<li class="footer-title hidden-xs">Customer Care</li>
<li>Contact us</li>
<li>Help</li>
<li>Shipping</li>
<li>Returns</li>
<li>Size Guide</li>
</ul>
</div>
</div>
<div class="col-sm-2 hidden-xs">
<div class="footer-col">
<ul>
<li class="footer-title">About Us</li>
<li>Our Story</li>
<li>Careers</li>
</ul>
</div>
</div>
<div class="col-sm-2 hidden-xs">
<div class="footer-col">
<ul>
<li class="footer-title">Shortcuts</li>
<li>My Account</li>
<li>Store Locator</li>
<li>Gift Cards</li>
<li>Payment</li>
</ul>
</div>
</div>
.wrapper {
display: inline-block;
background-color: #000000;
width: 100%;
height: 150px;
color: #999999;
}
.col-sm-2 {
float: right;
margin: 0;
width: 32%;
display: inline-block;
height: 90%;
}
.footer-col {
float: right;
margin: 0;
width: 90%;
padding-left: 10px;
display: inline-block;
height: 90%;
}
ul {
display: inline-block;
width: 90%;
height: 100%;
border-right: 1px solid #999999;
list-style: none;
}
li a {
color: #FFFFFF;
}
https://jsfiddle.net/michaelyuen/72dc7xrd/
There are two things:
1) Set ul height to 100%
2) Set height to parent or parent's parent. In this case, it's the wrapper.
OR use table, then you have to fix width instead of height.
https://jsfiddle.net/michaelyuen/72dc7xrd/1/
.wrapper {
display: table-row;
background-color: #000000;
color: #999999;
}
.col-sm-2 {
margin: 0;
padding-left: 10px;
width: 150px;
display: table-cell;
height: 90%;
border-right: 1px solid #999999;
vertical-align: top;
}
.footer-col {
margin: 0;
width: 90%;
display: inline-block;
height: 90%;
}
ul {
display: block;
margin: 0;
padding: 0;
width: 90%;
height: 100%;
list-style: none;
}
li a {
color: #FFFFFF;
}
Try this:
<style>
.verticalLine {
border-left: thick solid #E2C4C4;
margin-top:6px;
width:5px;
height:50px;
left: 408px;
position: absolute;
}
.pull_left {
float:left;
}
.clear {
clear: both;
}
</style>
<div class="col-sm-2">
<div class="footer-col pull_left">
<ul>
<li class="footer-title hidden-xs">Customer Care</li>
<li>Contact us</li>
<li>Help</li>
<li>Shipping</li>
<li>Returns</li>
<li>Size Guide</li>
</ul>
</div>
<div class="verticalLine pull_left"></div>
</div>
<div class="clear"></div>
<div class="col-sm-2 hidden-xs">
<div class="footer-col pull_left">
<ul>
<li class="footer-title">About Us</li>
<li>Our Story</li>
<li>Careers</li>
</ul>
</div>
<div class="verticalLine pull_left"></div>
</div>
<div class="clear"></div>
<div class="col-sm-2 hidden-xs">
<div class="footer-col pull_left">
<ul>
<li class="footer-title">Shortcuts</li>
<li>My Account</li>
<li>Store Locator</li>
<li>Gift Cards</li>
<li>Payment</li>
</ul>
</div>
<div class="verticalLine"></div>
</div>
Try like this: Demo
.col .well {
margin-bottom: -99999px;
padding-bottom: 99999px;
border-right:1px solid #ddd !important;
}
.col-wrap {
overflow: hidden;
}
.well {
min-height:20px;
padding:19px;
margin-bottom:20px;
background:transparent !important;
border-right:1px solid #e3e3e3 !important;
border:none !important;
box-shadow:none !important;
}
HTML:
<div class="container">
<div class="row col-wrap">
<div class="col-sm-2 col">
<div class="footer-col well">
....
</div>
</div>
<div class="col-sm-2 hidden-xs col">
<div class="footer-col well">
....
</div>
</div>
<div class="col-sm-2 hidden-xs col">
<div class="footer-col well">
....
</div>
</div>
</div>
</div>
Try this Create a outer container and apply overflow: hidden and apply margin and padding to the bottom
http://www.bootply.com/YNUeK8I29h
You can use after/before pseudo selectors.
http://jsfiddle.net/s7w4sqLd/
.footer-col ul:after {
position:absolute;
content:" ";
left:0;
top:0;
width:100%;
height:50px;
border-right: solid 1px #2a343f;
}
.footer-col ul{
position:relative;
float:left;
padding-right:10px;
}
.footer-col ul li {
list-style:none;
}