I don't know where is the problem in my code, some of html class can't apply the css code like the first class class="foot", here are my files
* {
margin: 0%;
padding: 0%;
box-sizing: border-box;
}
.foot {
position: fixed;
width: 100%;
min-height: 100px;
background-color: rgb(22, 22, 22);
bottom: 0%;
text-align: center;
padding: 10px;
}
.h2Foot {
color: rgb(238, 238, 238);
font-family: "Audiowild";
}
.ulContact {
list-style: none;
}
.afoot {
color: rgb(168, 168, 168);
font-size: 20px;
}
.afoot:hover {
text-decoration: none;
color: rgb(43, 188, 255);
}
.pfoot {
color: rgb(168, 168, 168);
font-size: 15px;
font-family: monospace;
}
.hrfoot {
border: 1px solid rgb(168, 168, 168);
margin-right: 5%;
margin-left: 5%;
}
.lbllogofoot {
font-size: 35px;
color: white;
font-family: "Audiowild";
}
.pCopyrightFoot {
color: white;
font-size: 18px;
font-family: "Audiowwild";
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="../css/footer.css" type="text/css">
<!-- bootstrap 4 css CDN -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- font-awesome CDN -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- font family -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Audiowide">
</head>
<body>
<footer class="foot">
<div class="row mt-2">
<div class="col-md-3 col-lg-3 col-sm-6 col-12">
<div class="mt-4 mb-2 text-center">
<h2 class="h2Foot">Social media</h2>
<ul class="ulContact mt-2">
<li class="d-inline-block p-1">
<i class="fab fa-facebook-square"></i>
</li>
<li class="d-inline-block p-1">
<i class="fab fa-instagram"></i>
</li>
<li class="d-inline-block p-1">
<i class="fab fa-whatsapp"></i>
</li>
<li class="d-inline-block p-1">
<i class="fab fa-twitter"></i>
</li>
</ul>
</div>
</div>
<div class="col-md-3 col-lg-3 col-sm-6 col-12">
<div class="mt-4 mb-2 text-center">
<h2 class="h2Foot">Shipping to</h2>
<p class="pfoot">Shippinh to all United Nations Member States</p>
</div>
</div>
<div class="col-md-3 col-lg-3 col-sm-6 col-12">
<div class="mt-4 mb-2 text-center">
<h2 class="h2Foot">Our products</h2>
<p class="pfoot">High quality & Low price + Guarantee for 3 months</p>
</div>
</div>
<div class="col-md-3 col-lg-3 col-sm-6 col-12">
<div class="mt-4 mb-2 text-center">
<h2 class="h2Foot">Paymen methods</h2>
<ul class="ulContact mt-2">
<li class="d-inline-block p-1">
<i class="fab fa-cc-visa"></i>
</li>
<li class="d-inline-block p-1">
<i class="fab fa-cc-mastercard"></i>
</li>
<li class="d-inline-block p-1">
<i class="fab fa-paypal"></i>
</li>
</ul>
</div>
</div>
</div>
<hr class="hrfoot">
<div class="row mt-2 mb-4">
<div class="col-md-6 col-lg-6 col-sm-6 col-12 mt-4">
<img src="../pics/demologo.png" alt="demologo" width="70px" height="60px"><label class="lbllogofoot">Logo</label>
</div>
<div class="col-md-6 col-lg-6 col-sm-6 col-12 mt-4">
<p class="pCopyrightFoot pt-3">© 2020 Copyright: <strong>ozaoujal07#gmail.com</strong></p>
</div>
</div>
</footer>
<!-- font-awesome js CDN -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/js/all.min.js"></script>
<!-- bootstrap 4 js CDN -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>
here is the output:
here is the DevTools:
I see the class in the element and I can't see it on a styles
enter image description here
It's work correctly, Did you try clear cache with CTRL + F5?
I make a one faq script in PHP I want to change the icon when I open the panel and close the panel.I have tried these code but not get success.So what is the error in my code?
<div class="col-md-9 col-lg-9 col-sm-12 ">
<?php $v1 = ''; foreach($var as $data){ ?>
<div class="faqHeader" id="<?php echo str_replace(' ','',$data['name']);?>"> <?php echo $data['name'];?> </div>
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<?php foreach($data['data'] as $dat){ ?>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" href="#col<?php
echo $v1;?>" aria-expanded="true" aria-controls="col<?php
echo $v1;?>">
<span class="glyphicon glyphicon-minus pull-right"></span>
<?php echo $dat['questions'];?>
</a>
</h4>
</div>
<div id="col<?php echo $v1;?>" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
<?php echo $dat['answer'];?>
</div>
</div>
</div>
<?php $v1=$v1+1; } ?>
</div>
<?php } ?>
</div>
<script>
$('.collapse').on('shown.bs.collapse', function(){
$(this).parent().find(".glyphicon-plus").removeClass("glyphicon-plus").addClass("glyphicon-minus");
}).on('hidden.bs.collapse', function(){
$(this).parent().find(".glyphicon-minus").removeClass("glyphicon-minus").addClass("glyphicon-plus");
});
</script>
Please help me?
Try this
css solution
.panel-heading [data-toggle="collapse"].collapsed:after{
content: "+";
float: right;
}
.panel-heading [data-toggle="collapse"]:after {
content: "-";
float: right;
}
.panel-heading [data-toggle="collapse"].collapsed:after{
content: "+";
float: right;
}
.panel-heading [data-toggle="collapse"]:after {
content: "-";
float: right;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<div class="container">
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#aaa">
aaa
</a>
</h4>
</div>
<div id="aaa" class="panel-collapse collapse in">
<div class="panel-body">
aaa<br>
aaa
</div>
</div>
</div> <!-- .panel -->
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#bbb">
bbb
</a>
</h4>
</div>
<div id="bbb" class="panel-collapse collapse">
<div class="panel-body">
bbb<br>
bbb
</div>
</div>
</div>
</div>
</div>
Js solution
$("#accordion, #bs-collapse").on("show.bs.collapse",function(a){
$(a.target).prev('.panel-heading').addClass('active');
});
$("#accordion, #bs-collapse").on('hide.bs.collapse',function(a){
$(a.target).prev('.panel-heading').removeClass('active');
});
$("#accordion, #bs-collapse").on("show.bs.collapse",function(a){
$(a.target).prev('.panel-heading').addClass('active');
});
$("#accordion, #bs-collapse").on('hide.bs.collapse',function(a){
$(a.target).prev('.panel-heading').removeClass('active');
});
.panel-heading a:after {
content: "+";
float: right;
}
.panel-heading.active a:after {
content: "-";
float: right;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<div class="container">
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading active">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#aaa">
aaa
</a>
</h4>
</div>
<div id="aaa" class="panel-collapse collapse in">
<div class="panel-body">
aaa<br>
aaa
</div>
</div>
</div> <!-- .panel -->
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#bbb">
bbb
</a>
</h4>
</div>
<div id="bbb" class="panel-collapse collapse">
<div class="panel-body">
bbb<br>
bbb
</div>
</div>
</div>
</div>
</div>
I am trying to show Result in search box using ajax and php, everything is working fine but the problem is occurring in displaying the result, it simply breaks the navbar.
this i the nav-bar code
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<div class="col-sm-6 col-md-6">
<form class="navbar-form" role="search">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" onkeyup="showresult(this.value)" name="q" autocomplete='off'>
<div id="livesearch"></div>
<div class="input-group-btn"><button class="btn btn-default"><i class="glyphicon glyphicon-search"></i></button>
</div>
</form>
</div>
<ul class="nav navbar-nav navbar-right">
/*code Reducted */
<li> <span class="glyphicon glyphicon-shopping-cart"></span> Shopping Cart</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
can anyone help me how to display the result as of google
may be i am missing some thing, i am still learning.
So ok i try hard with google and get a answer
#livesearch
{
position: absolute;
width: auto;
background: white;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
max-height: 200px;
overflow-y: auto;
border: 1px solid gray;
/*This is relative to the navbar now*/
left: 0;
right: 0;
top: 40px;
}
this helps me to solve the problem
<div class="container">
<!-- TOP -->
<?php var_dump($products['upper']); ?>
<div class="row" style="margin-top: 20px">
<div class="col-md-offset-3 col-md-6">
<h4 class="text-center"><small>STEP 1:</small> Choose your TOP</h4>
<div id="top-carousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<?php foreach ($products['upper'] as $index => $product): ?>
<div class="item <?php echo ($index == 0) ? 'active' : ''; ?>">
<img name="data" value="<?php echo $product['productID'] ?>" class="img-responsive center-block" src="<?php echo base_url();?>image/productimages/<?php echo $product['image'] ?>" style="margin: auto; height: 300px">
<div class="carousel-caption" style="padding: 10px; background-color: black; color: white;">
<?php echo $product['productname']; ?>
</div>
</div>
<?php endforeach ?>
</div>
<a class="left carousel-control" href="#top-carousel" role="button" data-slide="prev">
<i class="fa fa-lg fa-arrow-left" style="top: 45%; position: absolute; color: #000"></i>
</a>
<a class="right carousel-control" href="#top-carousel" role="button" data-slide="next">
<i class="fa fa-lg fa-arrow-right" style="top: 45%; position: absolute; color: #000"></i>
</a>
</div>
</div>
</div>
<?php var_dump($products['lower']); ?>
<!-- BOTTOM -->
<div class="row">
<div class="col-md-offset-3 col-md-6">
<h4 class="text-center"><small>STEP 2:</small> Choose your BOTTOM</h4>
<div id="bottom-carousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<?php foreach ($products['lower'] as $index => $product): ?>
<div class="item <?php echo ($index == 0) ? 'active' : ''; ?>">
<img name="<?php echo $product['productID'] ?>" class="img-responsive center-block" src="<?php echo base_url();?>image/productimages/<?php echo $product['image'] ?>" style="margin: auto; height: 300px">
<div class="carousel-caption" style="padding: 10px; background-color: black; color: white;">
<?php echo $product['productname']; ?>
</div>
</div>
<?php endforeach ?>
</div>
<a class="left carousel-control" href="#bottom-carousel" role="button" data-slide="prev">
<i class="fa fa-lg fa-arrow-left" style="top: 45%; position: absolute; color: #000"></i>
</a>
<a class="right carousel-control" href="#bottom-carousel" role="button" data-slide="next">
<i class="fa fa-lg fa-arrow-right" style="top: 45%; position: absolute; color: #000"></i>
</a>
</div>
</div>
<div class="row">
<div class="col-md-offset-3 col-md-7" style="padding-top: 50px">
<h4 class="text-center"><small>STEP 3:</small> Submit</h4>
<button type="submit" form="hidden_form" class="btn btn-lg btn-block btn-primary">Go!</button>
</div>
</div>
</div>
</form>
<script>
$(document).ready(function() {
var index = $(this).find(".active").index();
// Stop those carousels from spinning
$('.carousel').carousel({
interval : false
});
// Let's figure out what the customer chose on the carousel
// and then put it on the hidden form
$('.carousel').on('slide',function(e){
var slideFrom = $(this).find('.active').index();
var slideTo = $(e.relatedTarget).index();
console.log(slideFrom+' => '+slideTo);
});
});
</script>
The simplest way to get the product_ID data is as below
<img class="img-responsive center-block" src="<?php echo base_url();?>image/productimages/<?php echo $product['image'] ?>" style="margin: auto; height: 300px">
<input type="hidden" value="<?php echo $product['productID'] ?>" name="data" />
Use an <input type="hidden" tag to get the value exactly.
Whenever i going to add new article in joomla dashboard, it gets overlapped. I used following code to display articles.
<div class="col-md-9">
<div class="row">
<jdoc:include type="component"/>
</div>
</div>
I got articles in overlaps in each other. Instead i need to display articles in grid view. Can any one help me to resolve this problem.
When I inspect html element from browser I got following code snippet in row class div.
<div class="blog" itemscope="" itemtype="http://schema.org/Blog">
<div class="items-row cols-4 row-0 row-fluid clearfix">
<div class="span3 col-md-3">
<div class="item column-1" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting">
<div class="pull-left item-image">
<img src="/textile/images/belt-fasteners.png" alt="" itemprop="thumbnailUrl">
</div>
<div>
<h3 style="text-align: center;">Belt Fasteners</h3>
<p><span class="A32"><span style="font-size: 10pt;">We stock a vast range of belt fasteners for all thickness of belts and for a variety of applications.</span></span></p>
<p><span style="font-size: 11pt; line-height: 115%; font-family: 'Calibri','sans-serif';">Widths: 25mm, 38.5mm, 40mm, 50mm, 57mm, 63mm, 75mm, 89mm, 100mm, 150mm, 300mm.</span></p>
<p class="readmore">
<a class="btn btn-success" href="/textile/index.php/4-belt-fasteners" itemprop="url">
<span class="icon-chevron-right"></span>
Read more ... </a>
</p>
</div>
<!-- end item -->
</div><!-- end span -->
<div class="span3 col-md-3">
<div class="item column-2" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting">
<div class="pull-left item-image">
<img src="/textile/images/belt-fasteners.png" alt="" itemprop="thumbnailUrl">
</div>
<div>
<h3 style="text-align: center;">Belt Fasteners</h3>
<p><span class="A32"><span style="font-size: 10pt;">We stock a vast range of belt fasteners for all thickness of belts and for a variety of applications.</span></span></p>
<p><span style="font-size: 11pt; line-height: 115%; font-family: 'Calibri','sans-serif';">Widths: 25mm, 38.5mm, 40mm, 50mm, 57mm, 63mm, 75mm, 89mm, 100mm, 150mm, 300mm.</span></p>
<p class="readmore">
<a class="btn btn-success" href="/textile/index.php/6-belt-fasteners-3" itemprop="url">
<span class="icon-chevron-right"></span>
Read more ... </a>
</p>
</div>
<!-- end item -->
</div><!-- end span -->
<div class="span3 col-md-3">
<div class="item column-3" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting">
<div class="pull-left item-image">
<img src="/textile/images/belt-fasteners.png" alt="" itemprop="thumbnailUrl">
</div>
<div>
<h3 style="text-align: center;">Belt Fasteners</h3>
<p><span class="A32"><span style="font-size: 10pt;">We stock a vast range of belt fasteners for all thickness of belts and for a variety of applications.</span></span></p>
<p><span style="font-size: 11pt; line-height: 115%; font-family: 'Calibri','sans-serif';">Widths: 25mm, 38.5mm, 40mm, 50mm, 57mm, 63mm, 75mm, 89mm, 100mm, 150mm, 300mm.</span></p>
<p class="readmore">
<a class="btn btn-success" href="/textile/index.php/8-belt-fasteners-5" itemprop="url">
<span class="icon-chevron-right"></span>
Read more ... </a>
</p>
</div>
<!-- end item -->
</div><!-- end span -->
<div class="span3 col-md-3">
<div class="item column-4" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting">
<div class="pull-left item-image">
<img src="/textile/images/belt-fasteners.png" alt="" itemprop="thumbnailUrl">
</div>
<div>
<h3 style="text-align: center;">Belt Fasteners</h3>
<p><span class="A32"><span style="font-size: 10pt;">We stock a vast range of belt fasteners for all thickness of belts and for a variety of applications.</span></span></p>
<p><span style="font-size: 11pt; line-height: 115%; font-family: 'Calibri','sans-serif';">Widths: 25mm, 38.5mm, 40mm, 50mm, 57mm, 63mm, 75mm, 89mm, 100mm, 150mm, 300mm.</span></p>
<p class="readmore">
<a class="btn btn-success" href="/textile/index.php/9-belt-fasteners-6" itemprop="url">
<span class="icon-chevron-right"></span>
Read more ... </a>
</p>
</div>
<!-- end item -->
</div><!-- end span -->
</div><!-- end row -->
<div class="items-row cols-4 row-1 row-fluid clearfix">
<div class="span3 col-md-3">
<div class="item column-1" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting">
<div class="pull-left item-image">
<img src="/textile/images/belt-fasteners.png" alt="" itemprop="thumbnailUrl">
</div>
<div>
<h3 style="text-align: center;">Belt Fasteners</h3>
<p><span class="A32"><span style="font-size: 10pt;">We stock a vast range of belt fasteners for all thickness of belts and for a variety of applications.</span></span></p>
<p><span style="font-size: 11pt; line-height: 115%; font-family: 'Calibri','sans-serif';">Widths: 25mm, 38.5mm, 40mm, 50mm, 57mm, 63mm, 75mm, 89mm, 100mm, 150mm, 300mm.</span></p>
<p class="readmore">
<a class="btn btn-success" href="/textile/index.php/5-belt-fasteners-2" itemprop="url">
<span class="icon-chevron-right"></span>
Read more ... </a>
</p>
</div>
<!-- end item -->
</div><!-- end span -->
<div class="span3 col-md-3">
<div class="item column-2" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting">
<div class="pull-left item-image">
<img src="/textile/images/belt-fasteners.png" alt="" itemprop="thumbnailUrl">
</div>
<div>
<h3 style="text-align: center;">Belt Fasteners</h3>
<p><span class="A32"><span style="font-size: 10pt;">We stock a vast range of belt fasteners for all thickness of belts and for a variety of applications.</span></span></p>
<p><span style="font-size: 11pt; line-height: 115%; font-family: 'Calibri','sans-serif';">Widths: 25mm, 38.5mm, 40mm, 50mm, 57mm, 63mm, 75mm, 89mm, 100mm, 150mm, 300mm.</span></p>
<p class="readmore">
<a class="btn btn-success" href="/textile/index.php/7-belt-fasteners-4" itemprop="url">
<span class="icon-chevron-right"></span>
Read more ... </a>
</p>
</div>
<!-- end item -->
</div><!-- end span -->
</div><!-- end row -->
</div>
</div>
</div>
</div>
</div><!--/.container-->
</div>
</div>
Add clearfix class to your parent div
like so
<div class="col-md-9 clearfix">
<div class="row clearfix">
<jdoc:include type="component"/>
</div>
</div>
or
style="clear:both"