make input and span next to each other - html

Trying to align input and span next to each other. Span is positioned below input ,how to align span on right side of input. I wanted to create a search bar with this input and span tag hence want to align next to each other
I have placed both of them inside one division yet it is not positioned correctly
is there any css property missing out or any css is given incorrectly in my code
.modal-body .search-input{
width:100%
}
#custom-search-input {
margin:0;
margin-top: 10px;
padding: 0;
}
.form-control{
border-radius: 0;
}
#custom-search-input .search-query {
padding-right: 3px;
padding-right: 4px \9;
padding-left: 3px;
padding-left: 4px \9;
border: 1px solid #494949 ;
/* border-right-style: none; */
margin-bottom: 0;
}
#custom-search-input button {
background-color:rgb(0,0,0,0.3) ;
height: calc(1.5em + .75rem + 2px);
padding: 2px 10px;
position: relative;
vertical-align: middle;
}
.ion-android-search{
font-size: 150%;
}
.btn-danger{
border:none;
border-radius: 0;
}
.input-group-btn{
float: right;
position: relative;
}
.search-query:focus + button {
z-index: 3;
}
.search-form {
width: 80%;
}
.search-form input:focus + .results { display: block }
.search-form .results {
display: none;
/* position: absolute; */
top: 35px;
left: 0;
cursor: pointer;
right: 0;
z-index: 10;
padding: 0;
margin: 0;
margin-top: 5px;
border-width: 1px;
border-style: solid;
border-color: #cbcfe2 #c8cee7 #c4c7d7;
border-radius: 3px;
background-color: #fdfdfd;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fdfdfd), color-stop(100%, #eceef4));
background-image: -webkit-linear-gradient(top, #fdfdfd, #eceef4);
background-image: -moz-linear-gradient(top, #fdfdfd, #eceef4);
background-image: -ms-linear-gradient(top, #fdfdfd, #eceef4);
background-image: -o-linear-gradient(top, #fdfdfd, #eceef4);
background-image: linear-gradient(top, #fdfdfd, #eceef4);
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-ms-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.search-form .results li { display: block }
.search-form .results li:first-child { margin-top: -1px }
.search-form .results li:first-child:before, .search-form .results li:first-child:after {
display: block;
content: '';
width: 0;
height: 0;
position: absolute;
left: 50%;
margin-left: -5px;
border: 5px outset transparent;
}
.search-form .results li:first-child:before {
border-bottom: 5px solid #c4c7d7;
top: -2px;
}
.search-form .results li:first-child:after {
border-bottom: 5px solid #fdfdfd;
top: -10px;
}
.search-form .results li:first-child:hover:before, .search .results li:first-child:hover:after { display: none }
.search-form .results li:last-child { margin-bottom: -1px }
.search-form .results li {
display: block;
position: relative;
margin: 0 -1px;
padding: 6px 40px 6px 10px;
color: #808394;
font-weight: 500;
text-shadow: 0 1px #fff;
border: 1px solid transparent;
border-radius: 3px;
}
.search-form .results li span { font-weight: 200 }
.search-form .results li:before {
content: '';
width: 18px;
height: 18px;
position: absolute;
top: 50%;
right: 10px;
margin-top: -9px;
/* background: url("https://cssdeck.com/uploads/media/items/7/7BNkBjd.png") 0 0 no-repeat; */
}
.search-form .results li:hover {
text-decoration: none;
color: #fff;
text-shadow: 0 -1px rgba(0, 0, 0, 0.3);
border-color: #28be9a #28be9a #28be9a;
background-color: #28be9a;
/* background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #59aaf4), color-stop(100%, #338cdf));
background-image: -webkit-linear-gradient(top, #59aaf4, #338cdf);
background-image: -moz-linear-gradient(top, #59aaf4, #338cdf);
background-image: -ms-linear-gradient(top, #59aaf4, #338cdf);
background-image: -o-linear-gradient(top, #59aaf4, #338cdf);
background-image: linear-gradient(top, #59aaf4, #338cdf); */
-webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
-moz-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
-ms-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
-o-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
}
:-moz-placeholder {
color: #a7aabc;
font-weight: 200;
}
::-webkit-input-placeholder {
color: #a7aabc;
font-weight: 200;
}
.lt-ie9 .search input { line-height: 26px }
<div class="modal fade" id="search-bar" role="dialog">
<div class="modal-dialog search-modal">
<div class="modal-content search-modal">
<div class="modal-body">
<div id="custom-search-input">
<div class="input-group col-md-12 ">
<form class="search-form">
<input type="text" id="myInput" class=" search-query form-control search-input" placeholder="Search" />
<span class="input-group-btn">
<button class="btn btn-danger" type="button">
<i class="ion-android-search "></i>
</button>
</span>
<ul class="results" >
</ul>
</form>
</div>
</div>
</div>
</div>
</div>
</div>

Add display: flex; to your .search-form
Take a look at flexbox, it is a more modern method for solving a lot of layout challenges.
https://css-tricks.com/snippets/css/a-guide-to-flexbox/
#custom-search-input {
margin:0;
margin-top: 10px;
padding: 0;
}
.form-control{
border-radius: 0;
}
#custom-search-input .search-query {
padding-right: 3px;
padding-right: 4px \9;
padding-left: 3px;
padding-left: 4px \9;
border: 1px solid #494949 ;
/* border-right-style: none; */
margin-bottom: 0;
}
#custom-search-input button {
background-color:rgb(0,0,0,0.3) ;
height: calc(1.5em + .75rem + 2px);
padding: 2px 10px;
position: relative;
vertical-align: middle;
}
.ion-android-search{
font-size: 150%;
}
.btn-danger{
border:none;
border-radius: 0;
}
.search-query:focus + button {
z-index: 3;
}
.search-form {
width: 100%;
display: flex;
flex-wrap: wrap;
}
.search-input{
flex-grow: 1;
}
.search-form input:focus + .results { display: block }
.search-form .results {
display: none;
/* position: absolute; */
top: 35px;
left: 0;
cursor: pointer;
right: 0;
z-index: 10;
padding: 0;
margin: 0;
margin-top: 5px;
border-width: 1px;
border-style: solid;
border-color: #cbcfe2 #c8cee7 #c4c7d7;
border-radius: 3px;
background-color: #fdfdfd;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fdfdfd), color-stop(100%, #eceef4));
background-image: -webkit-linear-gradient(top, #fdfdfd, #eceef4);
background-image: -moz-linear-gradient(top, #fdfdfd, #eceef4);
background-image: -ms-linear-gradient(top, #fdfdfd, #eceef4);
background-image: -o-linear-gradient(top, #fdfdfd, #eceef4);
background-image: linear-gradient(top, #fdfdfd, #eceef4);
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-ms-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.search-form .results li { display: block }
.search-form .results li:first-child { margin-top: -1px }
.search-form .results li:first-child:before, .search-form .results li:first-child:after {
display: block;
content: '';
width: 0;
height: 0;
position: absolute;
left: 50%;
margin-left: -5px;
border: 5px outset transparent;
}
.search-form .results li:first-child:before {
border-bottom: 5px solid #c4c7d7;
top: -2px;
}
.search-form .results li:first-child:after {
border-bottom: 5px solid #fdfdfd;
top: -10px;
}
.search-form .results li:first-child:hover:before, .search .results li:first-child:hover:after { display: none }
.search-form .results li:last-child { margin-bottom: -1px }
.search-form .results li {
display: block;
position: relative;
margin: 0 -1px;
padding: 6px 40px 6px 10px;
color: #808394;
font-weight: 500;
text-shadow: 0 1px #fff;
border: 1px solid transparent;
border-radius: 3px;
}
.search-form .results li span { font-weight: 200 }
.search-form .results li:before {
content: '';
width: 18px;
height: 18px;
position: absolute;
top: 50%;
right: 10px;
margin-top: -9px;
/* background: url("https://cssdeck.com/uploads/media/items/7/7BNkBjd.png") 0 0 no-repeat; */
}
.search-form .results li:hover {
text-decoration: none;
color: #fff;
text-shadow: 0 -1px rgba(0, 0, 0, 0.3);
border-color: #28be9a #28be9a #28be9a;
background-color: #28be9a;
/* background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #59aaf4), color-stop(100%, #338cdf));
background-image: -webkit-linear-gradient(top, #59aaf4, #338cdf);
background-image: -moz-linear-gradient(top, #59aaf4, #338cdf);
background-image: -ms-linear-gradient(top, #59aaf4, #338cdf);
background-image: -o-linear-gradient(top, #59aaf4, #338cdf);
background-image: linear-gradient(top, #59aaf4, #338cdf); */
-webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
-moz-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
-ms-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
-o-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
}
:-moz-placeholder {
color: #a7aabc;
font-weight: 200;
}
::-webkit-input-placeholder {
color: #a7aabc;
font-weight: 200;
}
.lt-ie9 .search input { line-height: 26px }
<div class="modal fade" id="search-bar" role="dialog">
<div class="modal-dialog search-modal">
<div class="modal-content search-modal">
<div class="modal-body">
<div id="custom-search-input">
<div class="input-group col-md-12 ">
<form class="search-form">
<input type="text" id="myInput" class=" search-query form-control search-input" placeholder="Search" />
<span class="input-group-btn">
<button class="btn btn-danger" type="button">
<i class="ion-android-search "></i>
</button>
</span>
</form>
<ul class="results" >
<li>Result</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>

Related

Numbers keep showing up

For some unknown reason, numbers keep showing up on the side of my div. I have tried everything to remove these numbers, but I have absolutely no idea where they appear from. I do know that it has to do with either the stylesheet or the html file. I provided the image below.
Also, "Vitalynx" is shifted all the way to the right and i cannot shift it back in the div with margin-left.. Any ideas? Help would be much appreciated!
leaderboard
Here's the html code:
<div id="ld">
<div class="leaderboard">
<h1>
Most active Players
</h1>
<ol>
<?= $fgmembersite->User1(); ?>
<?= $fgmembersite->User10(); ?>
</ol>
</div>
</div>
<br><br>
Here's the CSS:
/*--------------------
Leaderboard
--------------------*/
.ld h1 {
z-index: 0;
margin-top: -20px;
margin: -20px -5px 4px;
line-height: 40px;
text-shadow: 2px 1px 3px rgba(0,0,0,0.3);
font-weight: bold;
font: 23px "Lucida Grande", Tahoma, Verdana, sans-serif;
color: white;
text-align: center;
background: #12a7ee;
border-bottom: 0px solid #cfcfcf;
border-radius: 5px 5px;
-webkit-box-shadow: 3px 1px whitesmoke;
border-left:solid 0px #2ab7ec;
margin-left: 0px;
background-image: linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -o-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -moz-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -ms-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, rgb(44,160,202)),
color-stop(1, rgb(62,184,229))
);
border-radius: 6px;
-webkit-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #0c7095, 0px 10px 5px #999;
-moz-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #156785, 0px 10px 5px #999;
-o-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #156785, 0px 10px 5px #999;
box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #0c7095, 0px 10px 5px #999;
}
.leaderboard *,
.leaderboard *::before,
.leaderboard *::after {
box-sizing: border-box;
}
.leaderboard {
position: relative;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, 5%);
width: 245px;
height: 335px;
background-color: white;
background-color: #white;
border-radius: 10px;
box-shadow: 0 7px 30px rgba(62, 9, 11, 0.3);
}
.leaderboard h1 {
margin: -20px -2.8px 5px;
line-height: 40px;
text-shadow: 2px 1px 3px rgba(0,0,0,0.3);
font-weight: bold;
font: 23px "Lucida Grande", Tahoma, Verdana, sans-serif;
color: #fff;
text-align: center;
background: #12a7ee;
border-bottom: 0px solid #cfcfcf;
border-radius: 5px 5px;
-webkit-box-shadow: 3px 1px whitesmoke;
border-left:solid 0px #2ab7ec;
margin-left: -17.7px;
background-image: linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -o-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -moz-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -ms-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, rgb(44,160,202)),
color-stop(1, rgb(62,184,229))
);
border-radius: 6px;
-webkit-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #0c7095, 0px 10px 5px #999;
-moz-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #156785, 0px 10px 5px #999;
-o-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #156785, 0px 10px 5px #999;
box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #0c7095, 0px 10px 5px #999;
margin-left: -3px;
z-index: 0;
font-size: 18px;
color: #fffff;
padding: 12px 13px 15px;
}
.leaderboard h1 svg {
width: 25px;
height: 26px;
position: relative;
top: 3px;
margin-left: -30px;
vertical-align: baseline;
}
.leaderboard ol li {
margin-left: -22px;
position: relative;
z-index: 1;
font-size: 14px;
counter-increment: leaderboard;
padding: 18px 0px 23px 245px;
cursor: pointer;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform: translateZ(0) scale(1, 1);
transform: translateZ(0) scale(1, 1);
}
.leaderboard ol li::before {
position: absolute;
z-index: 2;
top: 15px;
left: 15px;
width: 20px;
height: 20px;
line-height: 20px;
color: #2b70ab;
background: #fff;
border-radius: 20px;
text-align: center;
}
.leaderboard ol li mark {
position: absolute;
text-shadow: 1px 3px 3px rgba(0,0,0,0.3);
z-index: 2;
top: 0;
left: -4px;
width: 100%;
height: 100%;
padding: 18px 10px 18px 50px;
margin: 0;
background: none;
color: #fff;
}
.leaderboard ol li mark::before, .leaderboard ol li mark::after {
position: absolute;
z-index: 1;
bottom: -11px;
left: -9px;
border-top: 10px solid #563689;
border-left: 10px solid transparent;
-webkit-transition: all .1s ease-in-out;
transition: all .1s ease-in-out;
opacity: 0;
}
.leaderboard ol li mark::after {
left: auto;
right: -9px;
border-left: none;
border-right: 10px solid transparent;
}
#d {
text-decoration: underline;
}
#e {
margin-left: -40px;
color: #fff;
text-shadow: 1px 3px 3px rgba(0,0,0,0.2);
}
.leaderboard ol li small {
position: relative;
text-shadow: 1px 3px 3px rgba(0,0,0,0.8);
font-size: 13px;
margin-left: -34px;
z-index: 2;
display: block;
color: #05eccc;
}
.leaderboard ol li::after {
position: absolute;
z-index: 1;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
-webkit-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
opacity: 0;
}
.leaderboard ol li:nth-child(1) {
background: #82d1a1;
}
.leaderboard ol li:nth-child(1)::after {
background: #ac918e;
}
.leaderboard ol li:nth-child(2) {
background: #1bb288;
}
.leaderboard ol li:nth-child(2)::after {
background: #b79a98;
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}
.leaderboard ol li:nth-child(2) mark::before, .leaderboard ol li:nth-child(2) mark::after {
border-top: 6px solid #ba4741;
bottom: -7px;
}
.leaderboard ol li:nth-child(3) {
background: #119c75;
}
.leaderboard ol li:nth-child(3)::after {
/* background: #d7514d; */
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.11);
}
.leaderboard ol li:nth-child(3) mark::before, .leaderboard ol li:nth-child(3) mark::after {
bottom: -3px;
}
.leaderboard ol li:nth-child(4) {
background: #108363;
}
.leaderboard ol li:nth-child(4)::after {
background: #cd4b4b;
box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.15);
}
.leaderboard ol li:nth-child(4) mark::before, .leaderboard ol li:nth-child(4) mark::after {
top: -7px;
bottom: auto;
border-top: none;
border-bottom: 6px;
}
.leaderboard ol li:nth-child(5) {
background: #0c7558;
border-radius: 0 0 10px 10px;
}
.leaderboard ol li:nth-child(5)::after {
background: #c24448;
margin-top: -20px;
margin: -21px -16.8px 5px;
line-height: 40px;
text-shadow: 2px 1px 3px rgba(0,0,0,0.3);
font-weight: bold;
font: 23px "Lucida Grande", Tahoma, Verdana, sans-serif;
color: #fff;
text-align: center;
background: #12a7ee;
border-bottom: 0px solid #cfcfcf;
border-radius: 5px 5px;
-webkit-box-shadow: 3px 1px whitesmoke;
border-left:solid 0px #2ab7ec;
margin-left: -17.7px;
background-image: linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -o-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -moz-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -ms-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, rgb(44,160,202)),
color-stop(1, rgb(62,184,229))
);
border-radius: 6px;
-webkit-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #0c7095, 0px 10px 5px #999;
-moz-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #156785, 0px 10px 5px #999;
-o-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #156785, 0px 10px 5px #999;
box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #0c7095, 0px 10px 5px #999;
}
.leaderboard ol li:nth-child(5) mark::before, .leaderboard ol li:nth-child(5) mark::after {
top: -9px;
bottom: auto;
border-top: none;
border-bottom: 8px;
}
.leaderboard ol li:hover {
z-index: 2;
overflow: visible;
}
.leaderboard ol li:hover::after {
opacity: 1;
-webkit-transform: scaleX(1.06) scaleY(1.03);
transform: scaleX(1.06) scaleY(1.03);
}
.leaderboard ol li:hover mark::before, .leaderboard ol li:hover mark::after {
opacity: 1;
-webkit-transition: all .35s ease-in-out;
transition: all .35s ease-in-out;
}
<ol> is the tag for an Ordered List, and so by default it will have numbers. If you'd like to remove them, do the following:
ol {
list-style-type:none;
}
In regards to your alignment issue, it seems that your right column text is left-aligned. I'd suggest making that text right-aligned, and the container would have to be positioned along the right hand side. Based on your structure, potential solutions would either be using position: absolute; right: 5px; on the text element, and then a position: relative on its parent or you could use float: right;, though I'd only suggest this method if you're familiar with how float works in general.
Your CSS is far too lengthy at this point for me to start digging through for an exact answer. Consider trimming it or posting only the relevant blocks and I can take a better look.
If I had to guess, I'd assume this is the block you're using to place the right column:
.leaderboard ol li {
...
margin-left: -22px;
padding: 18px 0px 23px 245px;
...
}
You're moving the text left by 245px using padding, which is a very "thrown together" method of accomplishing what you want. I'd start by changing the 245px to 0px and add a text-align: right; and moving forward from there.
Change <ol> to <ul> and add this style
ul li{list-style:none}

how link an outside page in my html page

I just want to link google page in my html code but nothing works. this is my css code.
a:hover { text-decoration: underline }
.container, .main {
width: 640px;
margin-left: auto;
margin-right: auto;
height: 300px;
}
.main { margin-top: 50px }
input {
font-family: 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 13px;
color: #555860;
}
.search {
position: relative;
margin: 0 auto;
width: 300px;
}
.search input {
height: 26px;
width: 100%;
padding: 0 12px 0 25px;
background: white url("http://cssdeck.com/uploads/media/items/5/5JuDgOa.png") 8px 6px no-repeat;
border-width: 1px;
border-style: solid;
border-color: #a8acbc #babdcc #c0c3d2;
border-radius: 13px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
-moz-box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
-ms-box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
-o-box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
}
.search input:focus {
outline: none;
border-color: #66b1ee;
-webkit-box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
-moz-box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
-ms-box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
-o-box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
}
.search input:focus + .results { display: block }
.search .results {
display: none;
position: absolute;
top: 35px;
left: 0;
right: 0;
z-index: 10;
padding: 0;
margin: 0;
border-width: 1px;
border-style: solid;
border-color: #cbcfe2 #c8cee7 #c4c7d7;
border-radius: 3px;
background-color: #fdfdfd;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fdfdfd), color-stop(100%, #eceef4));
background-image: -webkit-linear-gradient(top, #fdfdfd, #eceef4);
background-image: -moz-linear-gradient(top, #fdfdfd, #eceef4);
background-image: -ms-linear-gradient(top, #fdfdfd, #eceef4);
background-image: -o-linear-gradient(top, #fdfdfd, #eceef4);
background-image: linear-gradient(top, #fdfdfd, #eceef4);
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-ms-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.search .results li { display: block }
.search .results li:first-child { margin-top: -1px }
.search .results li:first-child:before, .search .results li:first-child:after {
display: block;
content: '';
width: 0;
height: 0;
position: absolute;
left: 50%;
margin-left: -5px;
border: 5px outset transparent;
}
.search .results li:first-child:before {
border-bottom: 5px solid #c4c7d7;
top: -11px;
}
.search .results li:first-child:after {
border-bottom: 5px solid #fdfdfd;
top: -10px;
}
.search .results li:first-child:hover:before, .search .results li:first-child:hover:after { display: none }
.search .results li:last-child { margin-bottom: -1px }
.search .results a {
display: block;
position: relative;
margin: 0 -1px;
padding: 6px 40px 6px 10px;
color: #808394;
font-weight: 500;
text-shadow: 0 1px #fff;
border: 1px solid transparent;
border-radius: 3px;
}
.search .results a span { font-weight: 200 }
.search .results a:before {
content: '';
width: 18px;
height: 18px;
position: absolute;
top: 50%;
right: 10px;
margin-top: -9px;
background: url("http://cssdeck.com/uploads/media/items/7/7BNkBjd.png") 0 0 no-repeat;
}
.search .results a:hover {
text-decoration: none;
color: #fff;
text-shadow: 0 -1px rgba(0, 0, 0, 0.3);
border-color: #2380dd #2179d5 #1a60aa;
background-color: #338cdf;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #59aaf4), color-stop(100%, #338cdf));
background-image: -webkit-linear-gradient(top, #59aaf4, #338cdf);
background-image: -moz-linear-gradient(top, #59aaf4, #338cdf);
background-image: -ms-linear-gradient(top, #59aaf4, #338cdf);
background-image: -o-linear-gradient(top, #59aaf4, #338cdf);
background-image: linear-gradient(top, #59aaf4, #338cdf);
-webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
-moz-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
-ms-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
-o-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
}
:-moz-placeholder {
color: #a7aabc;
font-weight: 200;
}
::-webkit-input-placeholder {
color: #a7aabc;
font-weight: 200;
}
.lt-ie9 .search input { line-height: 26px }
<section class="main">
<form class="search" method="post" action="index.html" >
<input type="text" name="q" placeholder="Search..." />
<ul class="results" >
<li>Search Result #1<br /><span>Description...</span></li>
</ul>
</form>
</section>
i think class="results" in ul tag is the problem, because when i cut it , my link work but after my page don't have style
Problem:
Yes in fact, the problem is in the search class, besides that the link is working perfectly and redirect you to Google page.
Explanation:
You have display:none; in the search class style which is hiding it from the page. And if you remove class="search", the ul will be shown but will loose all its style.
Solution:
To resolve the problem just remove the line:
display:none;
Or replace it with :
display:block;
This is a working DEMO:
a:hover { text-decoration: underline }
.container, .main {
width: 640px;
margin-left: auto;
margin-right: auto;
height: 300px;
}
.main { margin-top: 50px }
input {
font-family: 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 13px;
color: #555860;
}
.search {
position: relative;
margin: 0 auto;
width: 300px;
}
.search input {
height: 26px;
width: 100%;
padding: 0 12px 0 25px;
background: white url("http://cssdeck.com/uploads/media/items/5/5JuDgOa.png") 8px 6px no-repeat;
border-width: 1px;
border-style: solid;
border-color: #a8acbc #babdcc #c0c3d2;
border-radius: 13px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
-moz-box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
-ms-box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
-o-box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
}
.search input:focus {
outline: none;
border-color: #66b1ee;
-webkit-box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
-moz-box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
-ms-box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
-o-box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
}
.search input:focus + .results { display: block }
.search .results {
position: absolute;
top: 35px;
left: 0;
right: 0;
z-index: 10;
padding: 0;
margin: 0;
border-width: 1px;
border-style: solid;
border-color: #cbcfe2 #c8cee7 #c4c7d7;
border-radius: 3px;
background-color: #fdfdfd;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fdfdfd), color-stop(100%, #eceef4));
background-image: -webkit-linear-gradient(top, #fdfdfd, #eceef4);
background-image: -moz-linear-gradient(top, #fdfdfd, #eceef4);
background-image: -ms-linear-gradient(top, #fdfdfd, #eceef4);
background-image: -o-linear-gradient(top, #fdfdfd, #eceef4);
background-image: linear-gradient(top, #fdfdfd, #eceef4);
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-ms-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.search .results li { display: block }
.search .results li:first-child { margin-top: -1px }
.search .results li:first-child:before, .search .results li:first-child:after {
display: block;
content: '';
width: 0;
height: 0;
position: absolute;
left: 50%;
margin-left: -5px;
border: 5px outset transparent;
}
.search .results li:first-child:before {
border-bottom: 5px solid #c4c7d7;
top: -11px;
}
.search .results li:first-child:after {
border-bottom: 5px solid #fdfdfd;
top: -10px;
}
.search .results li:first-child:hover:before, .search .results li:first-child:hover:after { display: none }
.search .results li:last-child { margin-bottom: -1px }
.search .results a {
display: block;
position: relative;
margin: 0 -1px;
padding: 6px 40px 6px 10px;
color: #808394;
font-weight: 500;
text-shadow: 0 1px #fff;
border: 1px solid transparent;
border-radius: 3px;
}
.search .results a span { font-weight: 200 }
.search .results a:before {
content: '';
width: 18px;
height: 18px;
position: absolute;
top: 50%;
right: 10px;
margin-top: -9px;
background: url("http://cssdeck.com/uploads/media/items/7/7BNkBjd.png") 0 0 no-repeat;
}
.search .results a:hover {
text-decoration: none;
color: #fff;
text-shadow: 0 -1px rgba(0, 0, 0, 0.3);
border-color: #2380dd #2179d5 #1a60aa;
background-color: #338cdf;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #59aaf4), color-stop(100%, #338cdf));
background-image: -webkit-linear-gradient(top, #59aaf4, #338cdf);
background-image: -moz-linear-gradient(top, #59aaf4, #338cdf);
background-image: -ms-linear-gradient(top, #59aaf4, #338cdf);
background-image: -o-linear-gradient(top, #59aaf4, #338cdf);
background-image: linear-gradient(top, #59aaf4, #338cdf);
-webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
-moz-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
-ms-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
-o-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
}
:-moz-placeholder {
color: #a7aabc;
font-weight: 200;
}
::-webkit-input-placeholder {
color: #a7aabc;
font-weight: 200;
}
.lt-ie9 .search input { line-height: 26px }
<section class="main">
<form class="search" method="post" action="index.html" >
<input type="text" name="q" placeholder="Search..." />
<ul class="results" >
<li>Search Result #1<br /><span>Description...</span></li>
</ul>
</form>
</section>
You have display set to none in
.search .results.
Delete this statement: display: none or set display to block.
For more information please refer to display property.
You're right that .results is the problem - .search .results has display: none which hides the entire block.
You'll need to remove this line for it to show.

how to handle data inside grid system in bootstrap

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!

Have to double click li to open my link

I'm having trouble with a search box that has a dropdown. In the dropdown there are links but to open the links I have to double click them. Here is a link to my jsfiddle of it https://jsfiddle.net/ag7L02u0/. Anyone have a solution?
HTML:
<form class="search" method="post" action="" >
<input type="text" name="inputSearch" id="inputSearch" placeholder="Search Username" autocomplete="off" />
<ul class="search-ac" id="user-result">
<li>Search Result #2<br /><span>Description...</span></li>
<li>Search Result #3<br /><span>Description...</span></li>
<li>Search Result #4</li>
</ul>
<input type="submit" name="search" id="search" Style="display:none;">
</form>
CSS:
.search {
position: relative;
width: 300px;
float: right;
margin-top:5px;
}
.search input {
height: 26px;
width: 100%;
padding: 5px 12px 0px 25px;
background: white url("../img/search.png") 8px 6px no-repeat;
border: 1px solid;
border-color: #a8acbc #babdcc #c0c3d2;
-webkit-appearance: textfield;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: inset 0 1px #e5e7ed, 0 1px #fcfcfc;
box-shadow: inset 0 1px #e5e7ed, 0 1px #fcfcfc;
}
.search input:focus {
outline: 0;
border-color: #66b1ee;
-webkit-box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
}
.search input:focus + .search-ac {
display: block;
}
.search-ac {
display: none;
position: absolute;
top: 35px;
left: 0;
right: 0;
z-index: 100;
background: #fdfdfd;
border: 1px solid;
border-color: #cbcfe2 #c8cee7 #c4c7d7;
border-radius: 3px;
background-image: -webkit-linear-gradient(top, #fdfdfd, #eceef4);
background-image: -moz-linear-gradient(top, #fdfdfd, #eceef4);
background-image: -o-linear-gradient(top, #fdfdfd, #eceef4);
background-image: linear-gradient(to bottom, #fdfdfd, #eceef4);
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-webkit-padding-start: 0px;
}
.search-ac:hover {
display: block;
}
.search-ac li {
display: block;
z-index: 100000;
}
.search-ac li:first-child {
margin-top: -1px;
}
.search-ac li:first-child:before, .search-ac li:first-child:after {
content: '';
display: block;
width: 0;
height: 0;
position: absolute;
left: 50%;
margin-left: -5px;
border: 5px outset transparent;
}
.search-ac li:first-child:before {
border-bottom: 5px solid #c4c7d7;
top: -11px;
}
.search-ac li:first-child:after {
border-bottom: 5px solid #fdfdfd;
top: -10px;
}
.search-ac li:first-child:hover:before, .search-ac li:first-child:hover:after {
display: none;
}
.search-ac li:last-child {
margin-bottom: -1px;
}
.search-ac a {
display: block;
position: relative;
margin: 0 -1px;
padding: 6px 40px 6px 10px;
color: #808394;
font-weight: 500;
text-decoration: none;
text-shadow: 0 1px white;
border: 1px solid transparent;
border-radius: 3px;
z-index:110;
}
.search-ac a span {
font-weight: 200;
}
.search-ac a:before {
content: '';
position: absolute;
top: 50%;
right: 10px;
margin-top: -9px;
width: 18px;
height: 18px;
background: url("../img/arrow.png") 0 0 no-repeat;
}
.search-ac a:hover {
color: white;
text-shadow: 0 -1px rgba(0, 0, 0, 0.3);
background: #338cdf;
border-color: #2380dd #2179d5 #1a60aa;
background-image: -webkit-linear-gradient(top, #59aaf4, #338cdf);
background-image: -moz-linear-gradient(top, #59aaf4, #338cdf);
background-image: -o-linear-gradient(top, #59aaf4, #338cdf);
background-image: linear-gradient(to bottom, #59aaf4, #338cdf);
-webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
}
:-moz-placeholder {
color: #a7aabc;
font-weight: 200;
}
::-webkit-input-placeholder {
color: #a7aabc;
font-weight: 200;
line-height: 14px;
}
::-webkit-search-decoration,
::-webkit-search-cancel-button {
-webkit-appearance: none;
}
.lt-ie9 .search input {
line-height: 26px;
}
.btn-default{
float:right;
margin-top: -38px;
}
Have you tried changing your href attribute to something else than "#"?
I tried tour example and put there
<a href="http://stackoverflow.com" target="_">
works fine
Works for me? I just added www.google.com in the href and target="_blank" (so i didn't navigate away) and it re-directs. What are you doing with the links in your real document please.

How to make css search form responsive

i am trying to make use of min-width , max-width property but was unable to achieve the results as desired.
here is the code
HTML
<form class="form-wrapper-01">
<input id="search" type="text" />
<input id="submit" type="submit" value="Search" />
</form>
CSS
.form-wrapper-01 {
max-width: 450px;
width:100%;
padding: 10px;
margin: 100px auto;
overflow: hidden;
border-width: 1px;
border-style: solid;
border-color: #dedede #bababa #aaa #bababa;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
background-color: #f6f6f6;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#eae8e8));
background-image: -webkit-linear-gradient(top, #f6f6f6, #eae8e8);
background-image: -moz-linear-gradient(top, #f6f6f6, #eae8e8);
background-image: -ms-linear-gradient(top, #f6f6f6, #eae8e8);
background-image: -o-linear-gradient(top, #f6f6f6, #eae8e8);
background-image: linear-gradient(top, #f6f6f6, #eae8e8);
}
.form-wrapper-01 #search {
max-width: 330px;
width:100%;
height: 20px;
padding: 10px 5px;
float: left;
font: bold 16px 'lucida sans', 'trebuchet MS', 'Tahoma';
border: 1px solid #ccc;
-moz-box-shadow: 0 1px 1px #ddd inset, 0 1px 0 #fff;
-webkit-box-shadow: 0 1px 1px #ddd inset, 0 1px 0 #fff;
box-shadow: 0 1px 1px #ddd inset, 0 1px 0 #fff;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.form-wrapper-01 #search:focus {
outline: 0;
border-color: #aaa;
-moz-box-shadow: 0 1px 1px #bbb inset;
-webkit-box-shadow: 0 1px 1px #bbb inset;
box-shadow: 0 1px 1px #bbb inset;
}
.form-wrapper-01 #search::-webkit-input-placeholder {
color: #999;
font-weight: normal;
font-size:12px;
font-style:italic;
}
.form-wrapper-01 #search:-moz-placeholder {
color: #999;
font-weight: normal;
font-size:12px;
font-style:italic;
}
.form-wrapper-01 #search:-ms-input-placeholder {
color: #999;
font-weight: normal;
font-size:12px;
font-style:italic;
}
.form-wrapper-01 #submit {
float: right;
border: 1px solid #00748f;
height: 42px;
max-width: 100px;
width:100%;
padding: 0;
cursor: pointer;
font: bold 15px Arial, Helvetica;
color: #fafafa;
text-transform: none;
background-color: #0483a0;
background-image: -webkit-gradient(linear, left top, left bottom, from(#31b2c3), to(#0483a0));
background-image: -webkit-linear-gradient(top, #31b2c3, #0483a0);
background-image: -moz-linear-gradient(top, #31b2c3, #0483a0);
background-image: -ms-linear-gradient(top, #31b2c3, #0483a0);
background-image: -o-linear-gradient(top, #31b2c3, #0483a0);
background-image: linear-gradient(top, #31b2c3, #0483a0);
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
text-shadow: 0 1px 0 rgba(0, 0 ,0, .3);
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 1px 0 #fff;
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 1px 0 #fff;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 1px 0 #fff;
}
.form-wrapper-01 #submit:hover,
.form-wrapper-01 #submit:focus {
background-color: #31b2c3;
background-image: -webkit-gradient(linear, left top, left bottom, from(#0483a0), to(#31b2c3));
background-image: -webkit-linear-gradient(top, #0483a0, #31b2c3);
background-image: -moz-linear-gradient(top, #0483a0, #31b2c3);
background-image: -ms-linear-gradient(top, #0483a0, #31b2c3);
background-image: -o-linear-gradient(top, #0483a0, #31b2c3);
background-image: linear-gradient(top, #0483a0, #31b2c3);
}
.form-wrapper-01 #submit:active {
outline: 0;
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;
}
.form-wrapper-01 #submit::-moz-focus-inner {
border: 0;
}
here is live example
http://jsfiddle.net/6TUem/
as you can see the problem is with search button which shift itself in next line when you resize the window.i want it to stick with the input [text] field
Why not make something like this?
#media screen and (max-width: 520px) {
.form-wrapper-01 #submit {
float: none;
max-width: none;
margin-top: 1em;
}
.form-wrapper-01 #search {
max-width: none;
width: 100%%;
}
}
(Admittedly, I did change some things such as box-sizing.)
You have to wrap the input in a div and then use some style like this:
.form-wrapper-01 {
background-color: #f3f3f3;
width: 100%;
max-width: 450px;
position: relative;
display: block;
text-align: right;
padding: 10px;
}
#search {
background-color: #ff0000;
position: absolute;
left: 10px;
right: 100px;
}
#search input {
width: 100%;
}
#submit {
width: 80px;
}
See this fiddle: http://jsfiddle.net/6TUem/4/