I am creating a webpage in bootstrap using the grid system but having issues with the columns data. The containers are responsive but the data inside is not. How do I solve this issue. Please tell me what I am missing and what problem is it ...
Thanks alot
on desktop view
in mobile view
Here is my all code...
/* CSS Document */
/*background--start-*/
body {
background: url(images/drinks.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
/*background--end-*/
/*Logo-- start--*/
.hit-the-floor {
color: #fff;
font-size: 6em;
margin-top: 20px;
font-weight: bold;
font-family: ruthie;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, .1), 0 0 5px rgba(0, 0, 0, .1), 0 1px 3px rgba(0, 0, 0, .3), 0 3px 5px rgba(0, 0, 0, .2), 0 5px 10px rgba(0, 0, 0, .25), 0 10px 10px rgba(0, 0, 0, .2), 0 20px 20px rgba(0, 0, 0, .15);
}
.hit-the-floor {
text-align: center;
}
.hit-the-floor1 {
color: #fff;
font-size: 4em;
margin-left: 300px;
margin-top: -50px;
font-weight: bold;
font-family: ruthie;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, .1), 0 0 5px rgba(0, 0, 0, .1), 0 1px 3px rgba(0, 0, 0, .3), 0 3px 5px rgba(0, 0, 0, .2), 0 5px 10px rgba(0, 0, 0, .25), 0 10px 10px rgba(0, 0, 0, .2), 0 20px 20px rgba(0, 0, 0, .15);
}
.hit-the-floor1 {
text-align: center;
}
/*Logo--End--*/
/*navbar start*/
.nav_custom {
margin: 0 auto;
width: 950px;
height: 60px;
position: relative;
text-align: center;
}
.nav > li {
margin-right: 10px;
background: #000000;
opacity: 0.5;
width: 130px;
}
/*navbar end*/
/*location start*/
#b {
margin: 0 auto;
}
.location {
width: 87%;
height: 45px;
background-color: #C1BEBE;
margin-bottom: 20px;
margin: 0 auto;
}
/*Location end*/
.boddy {
width: 100%;
height: 800px;
}
/* Left Side bar*/
.left-sidebar {
float: left;
width: 200px;
height: 800px;
position: fixed;
}
/* Base Styles */
#cssmenu,
#cssmenu ul,
#cssmenu li,
#cssmenu a {
margin: 0;
padding: 0;
border: 0;
list-style: none;
font-weight: normal;
text-decoration: none;
line-height: 1;
font-family: 'Open Sans', sans-serif;
font-size: 14px;
position: relative;
}
#cssmenu a {
line-height: 1.3;
}
#cssmenu {
width: 200px;
}
#cssmenu > ul > li > a {
padding-right: 40px;
font-size: 25px;
font-weight: bold;
display: block;
background: #03FE91;
color: #ffffff;
border-bottom: 1px solid #5e071b;
text-transform: uppercase;
}
#cssmenu > ul > li > a > span {
background: #26C17E;
padding: 10px;
display: block;
font-size: 13px;
font-weight: 300;
}
#cssmenu > ul > li > a:hover {
text-decoration: none;
}
#cssmenu > ul > li.active {
border-bottom: none;
}
#cssmenu > ul > li.active > a {
color: #fff;
}
#cssmenu > ul > li.active > a span {
background: #26C17E;
}
#cssmenu span.cnt {
position: absolute;
top: 8px;
right: 15px;
padding: 0;
margin: 0;
background: none;
}
/* Sub menu */
#cssmenu ul ul {
display: none;
}
#cssmenu ul ul li {
border: 1px solid #e0e0e0;
border-top: 0;
}
#cssmenu ul ul a {
padding: 10px;
display: block;
color: #000000;
font-size: 13px;
}
#cssmenu ul ul a:hover {
color: #26C17E;
}
#cssmenu ul ul li.odd {
background: #f4f4f4;
}
#cssmenu ul ul li.even {
background: #fff;
}
/*end left side bar*/
.MainArea {
width: 1148px;
height: 800px;
margin-left: 200px;
margin-top: -20px;
}
/* search start */
.search {
width: 87%;
height: 55px;
background-color: #8F8B8B;
margin-top: -20px;
margin: 0 auto;
padding-top: 5px;
padding-left: 10px;
}
#webdesigntuts-workshop:after {
content: '';
display: block;
left: 50%;
margin: 0 0 0 -400px;
position: absolute;
width: 800px;
}
#webdesigntuts-workshop:before {
background: #444;
background: -webkit-linear-gradient(left, #151515, #444, #151515);
background: -moz-linear-gradient(left, #151515, #444, #151515);
background: -o-linear-gradient(left, #151515, #444, #151515);
background: -ms-linear-gradient(left, #151515, #444, #151515);
background: linear-gradient(left, #151515, #444, #151515);
top: 192px;
}
#webdesigntuts-workshop:after {
background: #000;
background: -webkit-linear-gradient(left, #151515, #000, #151515);
background: -moz-linear-gradient(left, #151515, #000, #151515);
background: -o-linear-gradient(left, #151515, #000, #151515);
background: -ms-linear-gradient(left, #151515, #000, #151515);
background: linear-gradient(left, #151515, #000, #151515);
top: 191px;
}
#webdesigntuts-workshop form {
background: #111;
background: -webkit-linear-gradient(#1b1b1b, #111);
background: -moz-linear-gradient(#1b1b1b, #111);
background: -o-linear-gradient(#1b1b1b, #111);
background: -ms-linear-gradient(#1b1b1b, #111);
background: linear-gradient(#1b1b1b, #111);
border: 1px solid #000;
border-radius: 5px;
box-shadow: inset 0 0 0 1px #272727;
display: inline-block;
font-size: 0px;
margin: 150px auto 0;
padding: 20px;
position: relative;
z-index: 1;
}
#webdesigntuts-workshop input {
background: #222;
background: -webkit-linear-gradient(#333, #222);
background: -moz-linear-gradient(#333, #222);
background: -o-linear-gradient(#333, #222);
background: -ms-linear-gradient(#333, #222);
background: linear-gradient(#333, #222);
border: 1px solid #444;
border-radius: 5px 0 0 5px;
box-shadow: 0 2px 0 #000;
color: #888;
display: block;
float: left;
font-family: 'Cabin', helvetica, arial, sans-serif;
font-size: 13px;
font-weight: 400;
height: 42px;
margin: 0;
padding: 0 10px;
text-shadow: 0 -1px 0 #000;
width: 200px;
}
#ie #webdesigntuts-workshop input {
line-height: 40px;
}
#webdesigntuts-workshop input::-webkit-input-placeholder {
color: #888;
}
#webdesigntuts-workshop input:-moz-placeholder {
color: #888;
}
#webdesigntuts-workshop input:focus {
-webkit-animation: glow 800ms ease-out infinite alternate;
-moz-animation: glow 800ms ease-out infinite alternate;
-o-animation: glow 800ms ease-out infinite alternate;
-ms-animation: glow 800ms ease-out infinite alternate;
animation: glow 800ms ease-out infinite alternate;
background: #222922;
background: -webkit-linear-gradient(#333933, #222922);
background: -moz-linear-gradient(#333933, #222922);
background: -o-linear-gradient(#333933, #222922);
background: -ms-linear-gradient(#333933, #222922);
background: linear-gradient(#333933, #222922);
border-color: #393;
box-shadow: 0 0 5px rgba(0, 255, 0, .2), inset 0 0 5px rgba(0, 255, 0, .1), 0 2px 0 #000;
color: #efe;
outline: none;
}
#webdesigntuts-workshop input:focus::-webkit-input-placeholder {
color: #efe;
}
#webdesigntuts-workshop input:focus:-moz-placeholder {
color: #efe;
}
#webdesigntuts-workshop button {
background: #222;
background: -webkit-linear-gradient(#333, #222);
background: -moz-linear-gradient(#333, #222);
background: -o-linear-gradient(#333, #222);
background: -ms-linear-gradient(#333, #222);
background: linear-gradient(#333, #222);
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
-o-box-sizing: content-box;
-ms-box-sizing: content-box;
box-sizing: content-box;
border: 1px solid #444;
border-left-color: #000;
border-radius: 0 5px 5px 0;
box-shadow: 0 2px 0 #000;
color: #fff;
display: block;
float: left;
font-family: 'Cabin', helvetica, arial, sans-serif;
font-size: 13px;
font-weight: 400;
height: 40px;
line-height: 40px;
margin: 0;
padding: 0;
position: relative;
text-shadow: 0 -1px 0 #000;
width: 80px;
}
#webdesigntuts-workshop button:hover,
#webdesigntuts-workshop button:focus {
background: #292929;
background: -webkit-linear-gradient(#393939, #292929);
background: -moz-linear-gradient(#393939, #292929);
background: -o-linear-gradient(#393939, #292929);
background: -ms-linear-gradient(#393939, #292929);
background: linear-gradient(#393939, #292929);
color: #5f5;
outline: none;
}
#webdesigntuts-workshop button:active {
background: #292929;
background: -webkit-linear-gradient(#393939, #292929);
background: -moz-linear-gradient(#393939, #292929);
background: -o-linear-gradient(#393939, #292929);
background: -ms-linear-gradient(#393939, #292929);
background: linear-gradient(#393939, #292929);
box-shadow: 0 1px 0 #000, inset 1px 0 1px #222;
top: 1px;
}
#-webkit-keyframes glow {
0% {
border-color: #393;
box-shadow: 0 0 5px rgba(0, 255, 0, .2), inset 0 0 5px rgba(0, 255, 0, .1), 0 2px 0 #000;
}
100% {
border-color: #6f6;
box-shadow: 0 0 20px rgba(0, 255, 0, .6), inset 0 0 10px rgba(0, 255, 0, .4), 0 2px 0 #000;
}
}
#-moz-keyframes glow {
0% {
border-color: #393;
box-shadow: 0 0 5px rgba(0, 255, 0, .2), inset 0 0 5px rgba(0, 255, 0, .1), 0 2px 0 #000;
}
100% {
border-color: #6f6;
box-shadow: 0 0 20px rgba(0, 255, 0, .6), inset 0 0 10px rgba(0, 255, 0, .4), 0 2px 0 #000;
}
}
#-o-keyframes glow {
0% {
border-color: #393;
box-shadow: 0 0 5px rgba(0, 255, 0, .2), inset 0 0 5px rgba(0, 255, 0, .1), 0 2px 0 #000;
}
100% {
border-color: #6f6;
box-shadow: 0 0 20px rgba(0, 255, 0, .6), inset 0 0 10px rgba(0, 255, 0, .4), 0 2px 0 #000;
}
}
#-ms-keyframes glow {
0% {
border-color: #393;
box-shadow: 0 0 5px rgba(0, 255, 0, .2), inset 0 0 5px rgba(0, 255, 0, .1), 0 2px 0 #000;
}
100% {
border-color: #6f6;
box-shadow: 0 0 20px rgba(0, 255, 0, .6), inset 0 0 10px rgba(0, 255, 0, .4), 0 2px 0 #000;
}
}
#keyframes glow {
0% {
border-color: #393;
box-shadow: 0 0 5px rgba(0, 255, 0, .2), inset 0 0 5px rgba(0, 255, 0, .1), 0 2px 0 #000;
}
100% {
border-color: #6f6;
box-shadow: 0 0 20px rgba(0, 255, 0, .6), inset 0 0 10px rgba(0, 255, 0, .4), 0 2px 0 #000;
}
}
/*search end*/
.item-data {
width: 942px;
height: 800px;
background-color: #000000;
}
.item {
width: 942px;
height: 140px;
background-color: #4B3939;
border-bottom: #FFFFFF 1px solid;
padding-top: 20px;
}
.image-size {
background: url(images/jalal.jpg);
background-repeat: no-repeat;
width: 120px;
height: 95px;
border: #FFFFFF 1px solid;
box-shadow: #000000;
margin-left: 20px;
}
.text {
font-size: 18px;
color: #000000;
margin-left: 150px;
margin-top: -95px;
}
.text1 {
font-size: 12px;
color: #000000;
margin-left: 150px;
}
.rate_bar {
width: 150px;
height: 40px;
background-color: #FFFFFF;
margin-left: 400px;
margin-top: -55px;
}
article {
width: 60%;
height: 30%;
margin: 0 auto;
}
.p2 {
color: #FFFFFF;
font-size: 50px;
text-align: center;
}
.circle-area {
width: 1200px;
height: 180px;
margin: 0 auto;
position: static;
margin-top: 150px;
}
.myimg {
margin-top: 15px;
opacity: 1;
}
.circle {
float: left;
width: 150px;
height: 150px;
padding: 10px;
border: 2px solid #000000;
border-radius: 75px;
margin-left: 170px;
margin-top: 10px;
}
.circle:hover {
width: 150px;
height: 150px;
padding: 0px;
border: 2px solid #000000;
border-radius: 75px;
}
.small {
width: 120px;
height: 120px;
background-color: #2F9615;
border-radius: 60px;
}
.small:hover {
width: 150px;
height: 150px;
transform: scale(1);
background-color: #2F9615;
border-radius: 75px;
}
footer {
background-color: #000000;
margin-top: 27px;
opacity: .6;
width: 100%;
height: 60px;
position: absolute;
}
p {
color: #FFFFFF;
margin-left: 2px;
}
.p1 {
text-align: center;
color: #FFFFFF;
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>deals</title>
<link href="index.css" rel="stylesheet" type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="bootstrap-3.3.6-dist/css/bootstrap.css">
<link rel="stylesheet" href="bootstrap-3.3.6-dist/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="bootstrap-3.3.6-dist/css/bootstrap-theme.min.css">
<script src="bootstrap-3.3.6-dist/js/jquery-2.2.1.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="bootstrap-3.3.6-dist/js/bootstrap.min.js"></script>
<!-- sidebar script-->
<script src="script.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-lg-12" >
<p class="hit-the-floor">Restaurant</p>
<p class="hit-the-floor1">Hunt</p>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="nav_custom">
<nav class="navbar" >
<div class="container-fluid">
<div class="navbar-header form-group">
<select class="navbar-toggle collapsed selectpicker
form-control" data-toggle="collapse" data-target="#hafiz"
style="background: #ffffff; color:#000000;">
<option value="">Go to...</option>
<option value="#">Home</option>
<option value="#">Menu</option>
<option value="#">Restaurant</option>
<option value="#">About</option>
</select>
</div>
<div class=" collapse navbar-collapse" id="hafiz">
<ul class="nav navbar-nav">
<li class="active">Home</li>
<li>Page 1</li>
<li>Page 2</li>
<li>Page 3</li>
<li>Sign Up</li>
<li>Login</li>
</ul>
</div>
</div>
</nav>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="location" >
<div class="row">
<div class="col-lg-6" align="">
<img class="img-responsive" src="images/location.png" alt="location"
width="40px" height="40px" />
</div>
<div class="col-lg-6">
<button id="b" type="button" class="btn btn-success">Change location
</button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="search">
<form id="webdesigntuts-workshop" action="" method="">
<input type="search" placeholder="Search..." ><button> Search</button>
</form>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-2">
<div class="left-sidebar">
<div id="cssmenu">
<ul>
<li class="has-sub"><span>Deals Filter</span>
<ul>
<li><span>All Deals (7)</span></li>
<li><span>Kids Deals (1)</span></li>
<li><span>Hyper Discount (2)</span></li>
<li><span>Lunch Deals (1)</span></li>
<li class="last"><span>Midnight Deals (1)</span></li>
</ul>
</li>
<li class="has-sub"><span>Cuisines</span>
<ul>
<li><span>Bakery (1)</span></li>
<li><span>BBQ (1)</span></li>
<li><span>Chinese(1)</span></li>
<li><span>Continental (2)</span></li>
<li><span>Mediterranean (1)</span></li>
<li><span>Italian (1)</span></li>
<li><span>Pakistani (3)</span></li>
<li><span>Pizza (7)</span></li>
<li><span>Frozen Yogurt (Froyo) (1)</span></li>
<li class="last"><span>Fast Food (11)</span></li>
</ul>
</li>
<li class="has-sub last"><span>Buduge</span>
<ul>
<li><span>About</span></li>
<li class="last"><span>Location</span></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="col-lg-10">
<div class="item-data">
<div class="item">
<div class="image-size">
<img src="images/strip-sponsored.png" alt="img">
</div>
<p class="text">Jalal Sons, Allama Iqbal Twon</p>
<p class="text1">Bakery, Fast Food, Frozen Yogurt (Froyo)</p>
<div class="rate_bar">
</div>
</div>
<div class="item">
<div class="image-size">
<img src="images/strip-sponsored.png" alt="img">
</div>
<p class="text">Jalal Sons, Allama Iqbal Twon</p>
<p class="text1">Bakery, Fast Food, Frozen Yogurt (Froyo)</p>
<div class="rate_bar">
</div>
</div>
<div class="item">
<div class="image-size">
<img src="images/strip-sponsored.png" alt="img">
</div>
<p class="text">Jalal Sons, Allama Iqbal Twon</p>
<p class="text1">Bakery, Fast Food, Frozen Yogurt (Froyo)</p>
<div class="rate_bar">
</div>
</div>
<div class="item">
<div class="image-size">
<img src="images/strip-sponsored.png" alt="img">
</div>
<p class="text">Jalal Sons, Allama Iqbal Twon</p>
<p class="text1">Bakery, Fast Food, Frozen Yogurt (Froyo)</p>
<div class="rate_bar">
</div>
</div>
<div class="item">
<div class="image-size">
<img src="images/strip-sponsored.png" alt="img">
</div>
<p class="text">Jalal Sons, Allama Iqbal Twon</p>
<p class="text1">Bakery, Fast Food, Frozen Yogurt (Froyo)</p>
<div class="rate_bar">
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Made some small changes into your code, you should check the bootstrap documentation for further informations. http://getbootstrap.com/2.3.2/scaffolding.html
Also check the changes in your divs & documentation about bootstrap table-responsive (http://getbootstrap.com/css/#tables)
When you want your page to be responsive, try not to fix items for instance width: 942px becomes max-width: 942px
/* CSS Document */
/*background--start-*/
body {
background: url(images/drinks.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
/*background--end-*/
/*Logo-- start--*/
.hit-the-floor {
color: #fff;
font-size: 6em;
margin-top: 20px;
font-weight: bold;
font-family: ruthie;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, .1), 0 0 5px rgba(0, 0, 0, .1), 0 1px 3px rgba(0, 0, 0, .3), 0 3px 5px rgba(0, 0, 0, .2), 0 5px 10px rgba(0, 0, 0, .25), 0 10px 10px rgba(0, 0, 0, .2), 0 20px 20px rgba(0, 0, 0, .15);
}
.hit-the-floor {
text-align: center;
}
.hit-the-floor1 {
color: #fff;
font-size: 4em;
margin-left: 300px;
margin-top: -50px;
font-weight: bold;
font-family: ruthie;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, .1), 0 0 5px rgba(0, 0, 0, .1), 0 1px 3px rgba(0, 0, 0, .3), 0 3px 5px rgba(0, 0, 0, .2), 0 5px 10px rgba(0, 0, 0, .25), 0 10px 10px rgba(0, 0, 0, .2), 0 20px 20px rgba(0, 0, 0, .15);
}
.hit-the-floor1 {
text-align: center;
}
/*Logo--End--*/
/*navbar start*/
.nav_custom {
margin: 0 auto;
width: 950px;
height: 60px;
position: relative;
text-align: center;
}
.nav > li {
margin-right: 10px;
background: #000000;
opacity: 0.5;
width: 130px;
}
/*navbar end*/
/*location start*/
#b {
margin: 0 auto;
}
.location {
width: 87%;
height: 45px;
background-color: #C1BEBE;
margin-bottom: 20px;
margin: 0 auto;
}
/*Location end*/
.boddy {
width: 100%;
height: 800px;
}
/* Left Side bar*/
.left-sidebar {
float: left;
width: 200px;
height: 800px;
position: fixed;
}
/* Base Styles */
#cssmenu,
#cssmenu ul,
#cssmenu li,
#cssmenu a {
margin: 0;
padding: 0;
border: 0;
list-style: none;
font-weight: normal;
text-decoration: none;
line-height: 1;
font-family: 'Open Sans', sans-serif;
font-size: 14px;
position: relative;
}
#cssmenu a {
line-height: 1.3;
}
#cssmenu {
width: 200px;
}
#cssmenu > ul > li > a {
padding-right: 40px;
font-size: 25px;
font-weight: bold;
display: block;
background: #03FE91;
color: #ffffff;
border-bottom: 1px solid #5e071b;
text-transform: uppercase;
}
#cssmenu > ul > li > a > span {
background: #26C17E;
padding: 10px;
display: block;
font-size: 13px;
font-weight: 300;
}
#cssmenu > ul > li > a:hover {
text-decoration: none;
}
#cssmenu > ul > li.active {
border-bottom: none;
}
#cssmenu > ul > li.active > a {
color: #fff;
}
#cssmenu > ul > li.active > a span {
background: #26C17E;
}
#cssmenu span.cnt {
position: absolute;
top: 8px;
right: 15px;
padding: 0;
margin: 0;
background: none;
}
/* Sub menu */
#cssmenu ul ul {
display: none;
}
#cssmenu ul ul li {
border: 1px solid #e0e0e0;
border-top: 0;
}
#cssmenu ul ul a {
padding: 10px;
display: block;
color: #000000;
font-size: 13px;
}
#cssmenu ul ul a:hover {
color: #26C17E;
}
#cssmenu ul ul li.odd {
background: #f4f4f4;
}
#cssmenu ul ul li.even {
background: #fff;
}
/*end left side bar*/
.MainArea {
width: 1148px;
height: 800px;
margin-left: 200px;
margin-top: -20px;
}
/* search start */
.search {
width: 87%;
height: 55px;
background-color: #8F8B8B;
margin-top: -20px;
margin: 0 auto;
padding-top: 5px;
padding-left: 10px;
}
#webdesigntuts-workshop:after {
content: '';
display: block;
left: 50%;
margin: 0 0 0 -400px;
position: absolute;
width: 800px;
}
#webdesigntuts-workshop:before {
background: #444;
background: -webkit-linear-gradient(left, #151515, #444, #151515);
background: -moz-linear-gradient(left, #151515, #444, #151515);
background: -o-linear-gradient(left, #151515, #444, #151515);
background: -ms-linear-gradient(left, #151515, #444, #151515);
background: linear-gradient(left, #151515, #444, #151515);
top: 192px;
}
#webdesigntuts-workshop:after {
background: #000;
background: -webkit-linear-gradient(left, #151515, #000, #151515);
background: -moz-linear-gradient(left, #151515, #000, #151515);
background: -o-linear-gradient(left, #151515, #000, #151515);
background: -ms-linear-gradient(left, #151515, #000, #151515);
background: linear-gradient(left, #151515, #000, #151515);
top: 191px;
}
#webdesigntuts-workshop form {
background: #111;
background: -webkit-linear-gradient(#1b1b1b, #111);
background: -moz-linear-gradient(#1b1b1b, #111);
background: -o-linear-gradient(#1b1b1b, #111);
background: -ms-linear-gradient(#1b1b1b, #111);
background: linear-gradient(#1b1b1b, #111);
border: 1px solid #000;
border-radius: 5px;
box-shadow: inset 0 0 0 1px #272727;
display: inline-block;
font-size: 0px;
margin: 150px auto 0;
padding: 20px;
position: relative;
z-index: 1;
}
#webdesigntuts-workshop input {
background: #222;
background: -webkit-linear-gradient(#333, #222);
background: -moz-linear-gradient(#333, #222);
background: -o-linear-gradient(#333, #222);
background: -ms-linear-gradient(#333, #222);
background: linear-gradient(#333, #222);
border: 1px solid #444;
border-radius: 5px 0 0 5px;
box-shadow: 0 2px 0 #000;
color: #888;
display: block;
float: left;
font-family: 'Cabin', helvetica, arial, sans-serif;
font-size: 13px;
font-weight: 400;
height: 42px;
margin: 0;
padding: 0 10px;
text-shadow: 0 -1px 0 #000;
width: 200px;
}
#ie #webdesigntuts-workshop input {
line-height: 40px;
}
#webdesigntuts-workshop input::-webkit-input-placeholder {
color: #888;
}
#webdesigntuts-workshop input:-moz-placeholder {
color: #888;
}
#webdesigntuts-workshop input:focus {
-webkit-animation: glow 800ms ease-out infinite alternate;
-moz-animation: glow 800ms ease-out infinite alternate;
-o-animation: glow 800ms ease-out infinite alternate;
-ms-animation: glow 800ms ease-out infinite alternate;
animation: glow 800ms ease-out infinite alternate;
background: #222922;
background: -webkit-linear-gradient(#333933, #222922);
background: -moz-linear-gradient(#333933, #222922);
background: -o-linear-gradient(#333933, #222922);
background: -ms-linear-gradient(#333933, #222922);
background: linear-gradient(#333933, #222922);
border-color: #393;
box-shadow: 0 0 5px rgba(0, 255, 0, .2), inset 0 0 5px rgba(0, 255, 0, .1), 0 2px 0 #000;
color: #efe;
outline: none;
}
#webdesigntuts-workshop input:focus::-webkit-input-placeholder {
color: #efe;
}
#webdesigntuts-workshop input:focus:-moz-placeholder {
color: #efe;
}
#webdesigntuts-workshop button {
background: #222;
background: -webkit-linear-gradient(#333, #222);
background: -moz-linear-gradient(#333, #222);
background: -o-linear-gradient(#333, #222);
background: -ms-linear-gradient(#333, #222);
background: linear-gradient(#333, #222);
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
-o-box-sizing: content-box;
-ms-box-sizing: content-box;
box-sizing: content-box;
border: 1px solid #444;
border-left-color: #000;
border-radius: 0 5px 5px 0;
box-shadow: 0 2px 0 #000;
color: #fff;
display: block;
float: left;
font-family: 'Cabin', helvetica, arial, sans-serif;
font-size: 13px;
font-weight: 400;
height: 40px;
line-height: 40px;
margin: 0;
padding: 0;
position: relative;
text-shadow: 0 -1px 0 #000;
width: 80px;
}
#webdesigntuts-workshop button:hover,
#webdesigntuts-workshop button:focus {
background: #292929;
background: -webkit-linear-gradient(#393939, #292929);
background: -moz-linear-gradient(#393939, #292929);
background: -o-linear-gradient(#393939, #292929);
background: -ms-linear-gradient(#393939, #292929);
background: linear-gradient(#393939, #292929);
color: #5f5;
outline: none;
}
#webdesigntuts-workshop button:active {
background: #292929;
background: -webkit-linear-gradient(#393939, #292929);
background: -moz-linear-gradient(#393939, #292929);
background: -o-linear-gradient(#393939, #292929);
background: -ms-linear-gradient(#393939, #292929);
background: linear-gradient(#393939, #292929);
box-shadow: 0 1px 0 #000, inset 1px 0 1px #222;
top: 1px;
}
#-webkit-keyframes glow {
0% {
border-color: #393;
box-shadow: 0 0 5px rgba(0, 255, 0, .2), inset 0 0 5px rgba(0, 255, 0, .1), 0 2px 0 #000;
}
100% {
border-color: #6f6;
box-shadow: 0 0 20px rgba(0, 255, 0, .6), inset 0 0 10px rgba(0, 255, 0, .4), 0 2px 0 #000;
}
}
#-moz-keyframes glow {
0% {
border-color: #393;
box-shadow: 0 0 5px rgba(0, 255, 0, .2), inset 0 0 5px rgba(0, 255, 0, .1), 0 2px 0 #000;
}
100% {
border-color: #6f6;
box-shadow: 0 0 20px rgba(0, 255, 0, .6), inset 0 0 10px rgba(0, 255, 0, .4), 0 2px 0 #000;
}
}
#-o-keyframes glow {
0% {
border-color: #393;
box-shadow: 0 0 5px rgba(0, 255, 0, .2), inset 0 0 5px rgba(0, 255, 0, .1), 0 2px 0 #000;
}
100% {
border-color: #6f6;
box-shadow: 0 0 20px rgba(0, 255, 0, .6), inset 0 0 10px rgba(0, 255, 0, .4), 0 2px 0 #000;
}
}
#-ms-keyframes glow {
0% {
border-color: #393;
box-shadow: 0 0 5px rgba(0, 255, 0, .2), inset 0 0 5px rgba(0, 255, 0, .1), 0 2px 0 #000;
}
100% {
border-color: #6f6;
box-shadow: 0 0 20px rgba(0, 255, 0, .6), inset 0 0 10px rgba(0, 255, 0, .4), 0 2px 0 #000;
}
}
#keyframes glow {
0% {
border-color: #393;
box-shadow: 0 0 5px rgba(0, 255, 0, .2), inset 0 0 5px rgba(0, 255, 0, .1), 0 2px 0 #000;
}
100% {
border-color: #6f6;
box-shadow: 0 0 20px rgba(0, 255, 0, .6), inset 0 0 10px rgba(0, 255, 0, .4), 0 2px 0 #000;
}
}
/*search end*/
.item-data {
width: 942px;
height: 800px;
background-color: #000000;
}
.item {
max-width: 942px;
height: 140px;
background-color: #4B3939;
border-bottom: #FFFFFF 1px solid;
padding-top: 20px;
}
.image-size {
background: url(images/jalal.jpg);
background-repeat: no-repeat;
width: 120px;
height: 95px;
border: #FFFFFF 1px solid;
box-shadow: #000000;
margin-left: 20px;
}
.text {
font-size: 18px;
color: #000000;
margin-left: 150px;
margin-top: -95px;
}
.text1 {
font-size: 12px;
color: #000000;
margin-left: 150px;
}
.rate_bar {
width: 150px;
height: 40px;
background-color: #FFFFFF;
float:right;
position: relative;
}
article {
width: 60%;
height: 30%;
margin: 0 auto;
}
.p2 {
color: #FFFFFF;
font-size: 50px;
text-align: center;
}
.circle-area {
width: 1200px;
height: 180px;
margin: 0 auto;
position: static;
margin-top: 150px;
}
.myimg {
margin-top: 15px;
opacity: 1;
}
.circle {
float: left;
width: 150px;
height: 150px;
padding: 10px;
border: 2px solid #000000;
border-radius: 75px;
margin-left: 170px;
margin-top: 10px;
}
.circle:hover {
width: 150px;
height: 150px;
padding: 0px;
border: 2px solid #000000;
border-radius: 75px;
}
.small {
width: 120px;
height: 120px;
background-color: #2F9615;
border-radius: 60px;
}
.small:hover {
width: 150px;
height: 150px;
transform: scale(1);
background-color: #2F9615;
border-radius: 75px;
}
footer {
background-color: #000000;
margin-top: 27px;
opacity: .6;
width: 100%;
height: 60px;
position: absolute;
}
p {
color: #FFFFFF;
margin-left: 2px;
}
.p1 {
text-align: center;
color: #FFFFFF;
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>deals</title>
<link href="style.css" rel="stylesheet" type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="bootstrap-3.3.6-dist/css/bootstrap.css">
<link rel="stylesheet" href="bootstrap-3.3.6-dist/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="bootstrap-3.3.6-dist/css/bootstrap-theme.min.css">
<script src="bootstrap-3.3.6-dist/js/jquery-2.2.1.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="bootstrap-3.3.6-dist/js/bootstrap.min.js"></script>
<!-- sidebar script-->
<script src="script.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-lg-12" >
<p class="hit-the-floor">Restaurant</p>
<p class="hit-the-floor1">Hunt</p>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="nav_custom">
<nav class="navbar" >
<div class="container-fluid">
<div class="navbar-header form-group">
<select class="navbar-toggle collapsed selectpicker
form-control" data-toggle="collapse" data-target="#hafiz"
style="background: #ffffff; color:#000000;">
<option value="">Go to...</option>
<option value="#">Home</option>
<option value="#">Menu</option>
<option value="#">Restaurant</option>
<option value="#">About</option>
</select>
</div>
<div class=" collapse navbar-collapse" id="hafiz">
<ul class="nav navbar-nav">
<li class="active">Home</li>
<li>Page 1</li>
<li>Page 2</li>
<li>Page 3</li>
<li>Sign Up</li>
<li>Login</li>
</ul>
</div>
</div>
</nav>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="location" >
<div class="row">
<div class="col-lg-6" align="">
<img class="img-responsive" src="images/location.png" alt="location"
width="40px" height="40px" />
</div>
<div class="col-lg-6">
<button id="b" type="button" class="btn btn-success">Change location
</button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="search">
<form id="webdesigntuts-workshop" action="" method="">
<input type="search" placeholder="Search..." ><button> Search</button>
</form>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-2">
<div class="left-sidebar">
<div id="cssmenu">
<ul>
<li class="has-sub"><span>Deals Filter</span>
<ul>
<li><span>All Deals (7)</span></li>
<li><span>Kids Deals (1)</span></li>
<li><span>Hyper Discount (2)</span></li>
<li><span>Lunch Deals (1)</span></li>
<li class="last"><span>Midnight Deals (1)</span></li>
</ul>
</li>
<li class="has-sub"><span>Cuisines</span>
<ul>
<li><span>Bakery (1)</span></li>
<li><span>BBQ (1)</span></li>
<li><span>Chinese(1)</span></li>
<li><span>Continental (2)</span></li>
<li><span>Mediterranean (1)</span></li>
<li><span>Italian (1)</span></li>
<li><span>Pakistani (3)</span></li>
<li><span>Pizza (7)</span></li>
<li><span>Frozen Yogurt (Froyo) (1)</span></li>
<li class="last"><span>Fast Food (11)</span></li>
</ul>
</li>
<li class="has-sub last"><span>Buduge</span>
<ul>
<li><span>About</span></li>
<li class="last"><span>Location</span></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="table-responsive">
<div class="item">
<div class="image-size">
<img src="images/strip-sponsored.png" alt="img">
</div>
<p class="text">Jalal Sons, Allama Iqbal Twon</p>
<p class="text1">Bakery, Fast Food, Frozen Yogurt (Froyo)</p>
<div class="rate_bar">
</div>
</div>
<div class="item">
<div class="image-size">
<img src="images/strip-sponsored.png" alt="img">
</div>
<p class="text">Jalal Sons, Allama Iqbal Twon</p>
<p class="text1">Bakery, Fast Food, Frozen Yogurt (Froyo)</p>
<div class="rate_bar">
</div>
</div>
<div class="item">
<div class="image-size">
<img src="images/strip-sponsored.png" alt="img">
</div>
<p class="text">Jalal Sons, Allama Iqbal Twon</p>
<p class="text1">Bakery, Fast Food, Frozen Yogurt (Froyo)</p>
<div class="rate_bar">
</div>
</div>
<div class="item">
<div class="image-size">
<img src="images/strip-sponsored.png" alt="img">
</div>
<p class="text">Jalal Sons, Allama Iqbal Twon</p>
<p class="text1">Bakery, Fast Food, Frozen Yogurt (Froyo)</p>
<div class="rate_bar">
</div>
</div>
<div class="item">
<div class="image-size">
<img src="images/strip-sponsored.png" alt="img">
</div>
<p class="text">Jalal Sons, Allama Iqbal Twon</p>
<p class="text1">Bakery, Fast Food, Frozen Yogurt (Froyo)</p>
<div class="rate_bar">
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Hope this helps!
I'm using the Nathan Smith Grid System and everything I wrap with the "container_12" class has a white background. What I want is it to be transparent.
Example: http://jsfiddle.net/JordanSimps/RZvxn/1/
HTML:
<!-- Beginning of the blue top header -->
<div class="top-header-wrap">
<div class="container_12">
<div class="top-header">
<div class="grid_2">
<img class="hover" src="http://www.dubstepcast.com/images/phone.png" /> (586) 997-9490
</div>
<div class="grid_3">
<img src="http://www.dubstepcast.com/images/mail.png" /> info#experienceheritage.org
</div>
<div id="social">
<div class="grid_7">
<ul>
<li id="twitter"><img id="twitter" src="http://www.dubstepcast.com/images/twitter.png" /></li>
<li id="pinterest"><img id="pinterest" src="http://www.dubstepcast.com/images/pinterest.png" /></li>
<li id="facebook"><img id="facebook" src="http://www.dubstepcast.com/images/facebook.png" /></li>
<li id="google"><img id="google" src="http://www.dubstepcast.com/images/google.png" /></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- End of the blue top header -->
<!-- Beginning of the second header - Logo & Navigation buttons -->
<div class="container_12">
<div class="bottom-header">
<!-- LOGO BEGINS HERE -->
<div class="grid_2">
<p><img class="logo" src="http://www.dubstepcast.com/images/logo2.png" /></p>
</div>
<!-- LOGO ENDS HERE -->
<!-- NAVIGATION BUTTONS BEGIN HERE -->
<div class="grid_8 prefix_2">
<ul class='navbar navbar-horizontal'>
<a href="#" id="panel-1" class="drop-shadow raised">
Home
</a>
<a href="#" id="panel-2">
FAQ's
</a>
<a href="#" id="panel-3">
Invite
</a>
<a href="#" id="panel-4">
Contact
</a>
</ul>
</div>
<!-- NAVIGATION BUTTONS END HERE -->
</div>
</div>
<!-- End of the second header - Logo & Navigation buttons -->
CSS:
#charset "UTF-8";
/* CSS Document */
body {
background-image: url('http://www.dubstepcast.com/images/bg.jpg');
background-repeat: repeat-x repeat-y;
color: #333;
font-size: 11px;
height: auto;
padding-bottom: 20px;
}
a {
color: #fff;
text-decoration: none;
}
h1 {
font-family: Georgia, serif;
font-weight: normal;
padding-top: 20px;
text-align: center;
}
h2 {
padding-top: 20px;
text-align: center;
}
p {
border: 1px solid #666;
overflow: hidden;
padding: 10px 0;
text-align: center;
}
/* HEADER */
/* TOP HEADER */
.top-header {
color: #FFF;
font-family: "Helvetica";
font-weight: bold;
font-size: 12px;
background: #11A1B1;
height: 43px;
padding-top: 15px;
}
.top-header a {
color: #FFF;
font-family: "Helvetica";
font-weight: bold;
font-size: 12px;
text-decoration: none;
}
.top-header a:hover {
color: #D3582D;
text-decoration: none;
}
.top-header-wrap {
border-top: solid 3px #32BED0;
background: #11A1B1;
height: 58px;
}
/* SOCIAL ICONS */
#social {
height: 35px;
}
#social li {
display: inline;
}
/* TWITTER */
#social ul #twitter a {
background-image: url('http://www.dubstepcast.com/images/twitter.png');
width: 18px;
height: 18px;
}
#social ul #twitter a:hover {
background-image: url('http://www.dubstepcast.com/images/twitter.png');
width: 18px;
height: 18px;
}
/* PINTEREST */
#social ul #pinterest a {
background-image: url('http://www.dubstepcast.com/images/pinterest.png');
width: 18px;
height: 18px;
}
#social ul #pinterest a:hover {
background-image: url('http://www.dubstepcast.com/images/pinterest_active.png');
width: 18px;
height: 18px;
}
/* FACEBOOK */
#social {
text-align: right;
}
#social ul #facebook a {
background-image: url('http://www.dubstepcast.com/images/facebook.png');
width: 18px;
height: 18px;
}
#social ul #facebook a:hover {
background-image: url('http://www.dubstepcast.com/images/facebook_active.png');
width: 18px;
height: 18px;
}
/* GOOGLE */
#social ul #google a {
background-image: url('http://www.dubstepcast.com/images/google.png');
width: 18px;
height: 18px;
}
#social ul #google a:hover {
background-image: url('http://www.dubstepcast.com/images/google_active.png');
width: 18px;
height: 18px;
}
/* BOTTOM HEADER */
.bottom-header {
margin-top: 10px;
height: 155px;
}
.bottom-header img {
margin-top: 25px;
}
.drop-shadow {
position:relative;
float:left;
width:40%;
padding:1em;
margin:2em 10px 4em;
background:#fff;
-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
-moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
}
.drop-shadow:before,
.drop-shadow:after {
content:"";
position:absolute;
z-index:-2;
}
.drop-shadow p {
font-size:16px;
font-weight:bold;
}
/*
* Kwicks: Sexy Sliding Panels for jQuery - v2.1.0
* http://devsmash.com/projects/navbar
*
* Copyright 2013 Jeremy Martin (jmar777)
* Contributors: Duke Speer (Duke3D)
* Released under the MIT license
* http://www.opensource.org/licenses/mit-license.php
*/
.navbar {
height: 100px;
display: block;
list-style-type: none;
list-style: none;
position: relative;
margin: 55px 0 0 25px;
padding: 0;
}
.navbar > a {
font-weight: 400;
font-family: "Helvetica";
letter-spacing: 1px;
border-radius: 0px 0px 5px 5px;
-moz-border-radius: 0px 0px 5px 5px;
-webkit-border-radius: 0px 0px 5px 5px;
-o-border-radius: 0px 0px 5px 5px;
-webkit-box-shadow: 0 10px 15px -8px rgba(62, 62, 62, 0.5), 0 1px 4px rgba(62, 62, 62, 0.2), 0 0 40px rgba(62, 62, 62, 0) inset;
-moz-box-shadow: 0 10px 15px -8px rgba(62, 62, 62, 0.5), 0 1px 4px rgba(62, 62, 62, 0.2), 0 0 40px rgba(62, 62, 62, 0) inset;
box-shadow: 0 10px 15px -8px rgba(62, 62, 62, 0.5), 0 1px 4px rgba(62, 62, 62, 0.2), 0 0 40px rgba(62, 62, 62, 0) inset;
font-size: 16px;
width: 125px;
height: 18px;
margin-left: 5px;
float: left;
text-align: center;
padding: 25px 0 30px 0;
}
.navbar > a p {
font-family: "Helvetica";
font-weight: lighter;
color: #11A1B1;
margin-top: 4px;
font-size: 10px;
letter-spacing: normal;
}
.navbar > a:hover p {
color: #11A1B1;
}
.navbar > a:hover {
color: #D3582D;
}
.navbar > * {
display: block;
overflow: hidden;
padding: 0;
margin: 0;
}
.navbar.navbar-processed > * {
margin: 0;
position: absolute;
}
.navbar-horizontal > * {
float: left;
}
.navbar-horizontal > :first-child {
margin-left: 0;
}
.navbar-vertical > :first-child {
margin-top: 0;
}
#panel-1 {
background-color: #464646;
border-top: solid 3px #11A1B1;
}
#panel-2 {
background-color: #464646;
border-top: solid 3px #11A1B1;
}
#panel-3 {
background-color: #464646;
border-top: solid 3px #11A1B1;
}
#panel-4 {
background-color: #464646;
border-top: solid 3px #11A1B1;
}
/* GIVES THE DROP-SHADOW ON THE NAVIGATION BUTTONS MORE OF A REALISTIC LOOK */
.drop-shadow {
position: relative;
float: left;
width: 40%;
padding: 1em;
margin: 2em 10px 4em;
background: #FFF;
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
}
.drop-shadow:before, .drop-shadow:after {
content: "";
position: absolute;
z-index: -2;
}
.drop-shadow p {
font-size: 16px;
font-weight: bold;
}
According to your jsfiddle the following CSS rules are being applied to container_12 in the demo.css file
.container_12, .container_16, .container_24 {
background-color: #fff; /* Makes the background white */
background-repeat: repeat-y;
margin-bottom: 20px;
}
So you can either remove these or overwrite them with
.container_12 {
background: none
}
add this to css
.container_12{
background: transparent;
}
as per firebug, this is line 2 of demo.css
.container_12, .container_16, .container_24 {
background-color: #FFFFFF;
background-repeat: repeat-y;
margin-bottom: 20px;
}
so use
#div.container_12 {
background-color: transparent;
}
to override it with greater specificity
You have background-color: #fff; set in demo.css
Change it to background-color: transparent;
I have the 2 divs that I want styled the same. One is called #popover, the other is called #recordViewPopover. Here is my CSS for popover. How can I make #recordViewPopover use the same CSS as #popover?
#popover {
-webkit-border-radius: 4px;
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-webkit-transition: opacity 0.25s linear;
-moz-border-radius: 4px;
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-moz-transition: opacity 0.25s linear;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
transition: opacity 0.25s linear;
border: 3px solid black;
border-radius: 4px;
background-color: white;
color: black;
cursor: auto;
display: none;
font-weight: normal;
line-height: 1;
position: absolute;
right: 22px;
z-index: 5000000;
}
#popover > .popover_triangle
{
border-top: 16px solid rgba(0,0,0,0);
border-left: 16px solid rgba(0,0,0,0);
border-right: 16px solid rgba(0,0,0,0);
border-bottom: 16px solid black;
font-size: 0px;
line-height: 0%;
position: absolute;
top: -34px;
left:150px;
width: 0px;
}
#popover > .header
{
background: #222;
background: -moz-linear-gradient(top, #333 0%, #111 100%);
background-image: -webkit-gradient(
linear,
left top,
left bottom,
from(rgba(255, 255, 255, 0.55)),
color-stop(0.2, rgba(255, 255, 255, 0.35)),
color-stop(0.5, rgba(255, 255, 255, 0.1)),
color-stop(0.5, transparent),
to(transparent));
color: white;
font-weight: bold;
height: 27px;
line-height: 25px;
margin: 0;
padding: 3px;
text-shadow: rgba(0, 0, 0, 1) 0 -1px 0;
text-align: center;
}
#popover > .content
{
font-size: 12px;
max-height: 400px;
overflow-x: hidden;
overflow-y: auto;
width: 190px;
}
#popover > .content ul
{
list-style: none;
margin: 0;
padding: 0;
}
#popover > .content ul li
{
border-bottom: #ccc 1px solid;
line-height: 25px;
}
#popover > .content ul li.item:hover
{
border-bottom: #1443be 1px solid;
}
#popover > .content ul li h6
{
background: #f3f3f3;
display: block;
color: #000;
font-size: 13px;
padding: 0 10px;
text-shadow: rgba(255, 255, 255, 1) 0 -1px 0;
}
#popover > .content ul li a
{
display: block;
padding: 0 14px;
}
#popover > .content ul li a:link,
#popover > .content ul li a:visited
{
text-decoration:none;color:#333;
}
#popover > .content ul li a:focus,
#popover > .content ul li a:hover
{
background: #5396e3 url('../images/arrow-small.png') 97% center no-repeat;
color: #fff;
text-decoration: none;
text-shadow: rgba(0, 0, 0, .55) 0 -1px 0;
}
Here are my divs
<div id='popover'>
<div class='popover_triangle'></div>
<div class='header'>OPTIONS</div>
<div class='content'>
<ul>
<li><h6>OBJECT VIEW</h6></li>
<li class='item'><a onclick=\"$(document).trigger('objectViewFiltersEnabled', [ !filtersEnabled ]);\">Filters</a></li>
<li class='item'><a href=\"#\" >Configuration</a></li>
<li><h6>OBJECT</h6></li>
<li class='item'><a href=\"#\" >Configuration</a></li>
<li class='item'><a href=\"#\" >Documentation</a></li>
</ul>
</div>
</div>
<div id='recordViewPopover'>
<div class='popover_triangle'></div>
<div class='header'>OPTIONS</div>
<div class='content'>
<ul>
<li><h6>Information</h6></li>
<li class='item'><a href='#' >Change Logs</a></li>
<li><h6>Actions</h6></li>
<li class='item'><a href='#' >Assign</a></li>
<li class='item'><a href='#' >Share</a></li>
<li class='item'><a href='#' >Convert</a></li>
<li class='item'><a href='#' >Copy</a></li>
<li class='item'><a href='#' >Clone</a></li>
<li class='item'><a href='#' >Merge</a></li>
<li class='item'><a href='#' >Refresh</a></li>
<li class='item'><a href='#' >Delete</a></li>
</ul>
</div>
</div>
You would assign them both the same class. To do this you would have:
<div id='popover' class='someName'>
<div id='recordViewPopover' class='someName'>
and your CSS would be declared:
.someName {
//Add styles here
}
You could group multiple selectors:
#popover > .popover_triangle,
#recordViewPopover > .popover_triangle {
Or give the elements a class, and use a class selector where you have the id selector.
.popover > .popover_triangle {
#popover, #recordViewPopover {
...
}
Oh, and also
#popover > .popover_triangle,
#recordViewPopover > .popover_triangle {
...
}
But if you expect to have more divs like these two, it would indeed be better to define a class for them.