I want to put a background image or background color for tag but i dont know how to it. Thanks
</div>
<div class="clear"> </div>
<!---start-content---->
<div class="main-content">
<div class="wrap">
<div class="left-sidebar">
<div class="sidebar-boxs">
<div class="clear"> </div>
<div class="type-videos">
<h3>Categories</h3>
<ul>
<li>Korean Drama</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
</ul>
Here's a short fiddle: https://jsfiddle.net/Hoargarth/qd60qa1L/1/
Basically you just need css for your html tag or a class.
html:
<!-- with css tag -->
<li>
test2
</li>
<!-- or with css class -->
<li class="list">
test3
</li>
css:
li {
background-color:red;
}
/* with class*/
.list{
background-color:green;
}
Related
I will try two scalize id however only one more worked. Every time second scalize function worked. How can I use one more scalize in one page. I want use scalize in repater.
I will try two scalize id however only one more worked. Every time second scalize function worked. How can I use one more scalize in one page. I want use scalize in repater.
`
<div class="scalize" id="scalize2">
<!-- Start Popover Template -->
<div id="content6" class="content center top">
<div class="head">
<img src="img/close.png" alt="" />
<h6 class="title">4</h6>
</div>
<div class="body">
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
<p>Mel ad euismod adipiscing moderatius eos an decore quodsi animal.</p>
</div>
</div>
<div id="content4" class="content right top">
<div class="head">
<img src="img/close.png" alt="" />
<h6 class="title">5</h6>
</div>
<div class="body">
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
<p>Mel ad euismod adipiscing moderatius eos an decore quodsi animal.</p>
</div>
</div>
<div id="content5" class="content right bottom">
<div class="head">
<img src="img/close.png" alt="" />
<h6 class="title">6</h6>
</div>
<div class="body">
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
<p>Mel ad euismod adipiscing moderatius eos an decore quodsi animal.</p>
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
</div>
</div>
<!-- End Popover Template -->
<img src="img/deneme.jpg" alt="" class="target">
<!-- Start Item Point -->
<div class="item-point item-point2" data-top="121" data-left="922" data-popover="#content4">
<div></div>
</div>
<!-- End Item Point -->
<!-- Start Item Point -->
<div class="item-point item-point2" data-top="333" data-left="462" data-popover="#content5">
<div></div>
</div>
<!-- End Item Point -->
<!-- Start Item Point -->
<div class="item-point item-point2" data-top="444" data-left="546" data-popover="#content6">
<div></div>
</div>
<!-- End Item Point -->
</div>
<div class="scalize" id="scalize3">
<!-- Start Popover Template -->
<div id="content1" class="content right top">
<div class="head">
<img src="img/close.png" alt="" />
<h6 class="title">1</h6>
</div>
<div class="body">
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
<p>Mel ad euismod adipiscing moderatius eos an decore quodsi animal.</p>
</div>
</div>
<div id="content3" class="content right top">
<div class="head">
<img src="img/close.png" alt="" />
<h6 class="title">2</h6>
</div>
<div class="body">
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
<p>Mel ad euismod adipiscing moderatius eos an decore quodsi animal.</p>
</div>
</div>
<div id="content2" class="content right bottom">
<div class="head">
<img src="img/close.png" alt="" />
<h6 class="title">3</h6>
</div>
<div class="body">
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
<p>Mel ad euismod adipiscing moderatius eos an decore quodsi animal.</p>
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
</div>
</div>
<!-- End Popover Template -->
<img src="img/2.jpg" alt="" class="target">
<!-- Start Item Point -->
<div class="item-point item-point3" data-top="320" data-left="922" data-popover="#content1">
<div></div>
</div>
<!-- End Item Point -->
<!-- Start Item Point -->
<div class="item-point item-point3" data-top="180" data-left="462" data-popover="#content3">
<div></div>
</div>
<!-- End Item Point -->
<!-- Start Item Point -->
<div class="item-point item-point3" data-top="192" data-left="546" data-popover="#content2">
<div></div>
</div>
<!-- End Item Point -->
</div>
<script type="text/javascript">
$(document).ready(function () {
$('#scalize2').scalize({
styleSelector: 'circle',
animationPopoverIn: 'fadeIn',
animationPopoverOut: 'fadeOut',
animationSelector: 'pulse2',
selector: '.item-point2',
getSelectorElement: function (el) {
$('.item-point2 .active').not($(el)[0]).find('.toggle2').click();
}
});
$('#scalize3').scalize({
styleSelector: 'circle',
animationPopoverIn: 'fadeIn',
animationPopoverOut: 'fadeOut',
animationSelector: 'pulse2',
selector: '.item-point3',
getSelectorElement: function (el) {
$('.item-point3 .active').not($(el)[0]).find('.toggle3').click();
}
});
});
</script>
`
I am trying to make an accordion using bootstrap 5. Everything is okay but the expand button is not working. If Accordion1 is expanded then I can't expand other Accordion.
My code is given below:
<div className="accordion " id="accordionPanelsStayOpenExample">
<div className="accordion-item">
<h2 className="accordion-header" id="panelsStayOpen-headingOne">
<button className="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseOne" aria-expanded="true" aria-controls="panelsStayOpen-collapseOne">
Accordion Item #1
</button>
</h2>
<div id="panelsStayOpen-collapseOne" className="accordion-collapse collapse show" aria-labelledby="panelsStayOpen-headingOne">
<div className="accordion-body">
<strong>Lorem ipsum dolor sit amet consectetur adipisicing elit. Cum voluptatum accusantium voluptates, quaerat voluptas tempore ut tempora, qui suscipit error veritatis. Voluptatem deserunt ipsa non optio! Ipsam deleniti maxime pariatur.</strong>
</div>
</div>
</div>
<div className="accordion-item">
<h2 className="accordion-header" id="panelsStayOpen-headingTwo">
<button className="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseTwo" aria-expanded="false" aria-controls="panelsStayOpen-collapseTwo">
Accordion Item #2
</button>
</h2>
<div id="panelsStayOpen-collapseTwo" className="accordion-collapse collapse" aria-labelledby="panelsStayOpen-headingTwo">
<div className="accordion-body">
<strong>This is the second item's accordion Lorem ipsum dolor sit amet consectetur adipisicing elit. Odit aliquid dolor beatae alias quas culpa reiciendis expedita deserunt sint quidem.</strong>
</div>
</div>
</div>
<div className="accordion-item">
<h2 className="accordion-header" id="panelsStayOpen-headingThree">
<button className="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseThree" aria-expanded="false" aria-controls="panelsStayOpen-collapseThree">
Accordion Item #3
</button>
</h2>
<div id="panelsStayOpen-collapseThree" className="accordion-collapse collapse" aria-labelledby="panelsStayOpen-headingThree">
<div className="accordion-body">
It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the , though the transition does limit overflow.
</div>
</div>
</div>
</div>
I think I am making something wrong. If anyone show me the mistake, I will be very happy.
In my Laravel application, I have made a component in Vue. The component itself is rendering properly, but the click handler is not firing. I have read many articles on the issue, but can't find the solution.(https://prnt.sc/tyiwmh + https://prnt.sc/tyiwwb + https://prnt.sc/tyix8l)
<template>
<div class="item border rounded-lg p-3">
<header>
<h2 class="mb-3">John Doe</h2>
<div class="arrows" v-on:click="showContent">
<img src="storage/img/chevron-down-light.svg" alt="" class="arrow-down">
<img src="storage/img/chevron-up-light.svg" alt="" class="arrow-up">
</div>
</header>
<div class="item-content" v-if="visible">
<div class="content-1">
<ul>
<li><b>Email:</b> john.doe#hotmail.com</li>
<li><b>Tel:</b> 0497 99 88 77</li>
</ul>
</div>
<hr>
<div class="content-2">
<ul>
<li><b>Vertrekplaats:</b> Ark van Noƫ</li>
<li><b>Aankomstplaats:</b> Watermolen Grobbendonk</li>
</ul>
</div>
<hr>
<div class="content-3">
<ul>
<li>2 enkelzitkajaks</li>
<li>3 dubbelzitkajaks</li>
<li>0 canadese kano's</li>
<li>2 zwemvesten</li>
<li>3 tonnetjes</li>
</ul>
</div>
<hr>
<div class="content-4">
<h3>Extra info:</h3>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Incidunt fuga dignissimos hic? Velit, ea aliquam! Consequuntur provident vitae, hic repudiandae, animi, ipsa ullam quidem accusamus vero ipsum aut porro nostrum.
</p>
</div>
</div>
</div>
</template>
<script>
export default {
data: function() {
return {
visible: false
}
},
methods: {
showContent: function() {
console.log('the button is clicked');
}
}
}
</script>
This might help no method necessary:
<div class="arrows" #click="visisble = !visible">
<img #click="visisble = !visible"
:src="'storage/img/chevron-' + (visible ? 'down-light.svg':'up-light.svg')"
alt=""
:class="'arrow-' + (visible ? 'down' : 'up' )">
</div>
Here is the code with vue.js , laravel.......
I want 'h5' attribute value that is {{$subcategory->name}} in my vue app, So I can perform other purpose.
<div class="container" id = "showProd">
<div class = "row">
<div class = "row" align = "center" id = "flash">
<div class="tabpanel">
<ul class="nav nav-tabs" role="tablist">
#foreach($data['subcategories'] as $count => $subcategory)
<li role="presentation" #if($count == 0) class="active" #endif>
<a href="#tab-{{ $subcategory->id }}" aria-controls="#tab-{{ $subcategory->id }}" role="tab" data-toggle="tab" v-on:click = "greet">
<div class="card" id = "category_list" style="width: 17rem;"><img id = "product_image" class="card-img-top" src="/images/0a09d8530691a1c23a4e4f4ec3eeff2a.jpg" alt="Card image cap" style="height:170px;">
<div class="card-body" >
<h5 class="card-title" id = "product_name" >{{$subcategory->name}}</h5>
</div>
</div>
</a>
</li>
#endforeach
</ul>
<div class="tab-content">
#foreach($data['subcategories'] as $count => $subcategory)
<div role="tabpanel" #if($count == 0) class="tab-pane active" #else class="tab-pane" #endif id="tab-{{ $subcategory->id }}">
<h2>{{ $subcategory->name }}</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias enim obcaecati praesentium repellat. Est explicabo facilis fuga illum iusto, obcaecati saepe voluptates! Dolores eaque porro quaerat sunt totam ut, voluptas.</p>
</div>
#endforeach
</div>
</div>
</div>
</div>
</div>
<script>
new Vue({
el: '#showProd',
data: {
name: 'Vue.js'
},
methods: {
greet: function (event) {
// `this` inside methods point to the Vue instance
var val = this.
alert('Hello ' + this.name + '!')
}
}
});
</script>
You can generate the data object from laravel and use vuejs binding and constructs to generate the html. This means that you won't rely on blade templating for generating the html, but on vuejs.
data () {
return JSON.parse( '{{json_decode($data['subcategories'])}}' )
}
Now you need to update your template to use the info from data and not directly from php via blade.
<div class="container" id = "showProd">
<div class = "row">
<div class = "row" align = "center" id = "flash">
<div class="tabpanel">
<ul class="nav nav-tabs" role="tablist">
<li v-for="(subcategory, subindex) in subcategories" role="presentation" :class="{'active': subindex === 0}">
<a :href="'#tab-' + subcategory.id" :aria-controls="'#tab-'+ subcategory.id" role="tab" data-toggle="tab" v-on:click = "greet">
<div class="card" id = "category_list" style="width: 17rem;"><img id = "product_image" class="card-img-top" src="/images/0a09d8530691a1c23a4e4f4ec3eeff2a.jpg" alt="Card image cap" style="height:170px;">
<div class="card-body" >
<h5 class="card-title" id = "product_name" >{{subcategory.name}}</h5>
</div>
</div>
</a>
</li>
</ul>
<div class="tab-content">
<div v-for="(subcategory, subindex) in subcategories" role="tabpanel" :class="{'tab-pane': subindex === 0, 'active': subindex === 0}" #else class="tab-pane" :id="'tab-'+subcategory.id">
<h2>{{ subcategory.name }}</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias enim obcaecati praesentium repellat. Est explicabo facilis fuga illum iusto, obcaecati saepe voluptates! Dolores eaque porro quaerat sunt totam ut, voluptas.</p>
</div>
</div>
</div>
</div>
</div>
</div>
Also, don't rely on id's in vue. Use refs or rely on vue binding.
There are several solutions to this, this is one:
In your html add a ref to your h5
<h5 class="card-title" id = "product_name" ref="product_name_{{$count" >{{$subcategory->name}}</h5>
You could add a parameter to the greet function that will receive the index that has been clicked
greet: function (pIndex) { //
// `this` inside methods point to the Vue instance
console.log(this.$refs['product_name_'pIndex].textContent) // Here
alert('Hello ' + this.name + '!')
}
I'm new to bootstrap and not that long into coding.
I created a carousel in bootstrap but the image is centered in the middle. but i want it to spread over the whole carousel. How do i fix this?
And i want the text on it be on te picture on the left side. How can i do this? I tried with text-align but maybe i did it at the wrong line.
<div class="row dnd_bottomspace">
<div class="col-md-12">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Carousel indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">
<h2>Slide 1</h2>
<div class="carousel-caption">
<img src="Materialien/erde.jpg" class="img-responsive">
<h3>Erster Slider</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</div>
<div class="item">
<h2>Slide 2</h2>
<div class="carousel-caption">
<img src="Materialien/erde.jpg" class="img-responsive">
<h3>Zweiter Slider</h3>
<p>Aliquam sit amet gravida nibh, facilisis gravida odio.</p>
</div>
</div>
<div class="item">
<h2>Slide 3</h2>
<div class="carousel-caption">
<img src="Materialien/erde.jpg" class="img-responsive">
<h3>Dritter Slider</h3>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
</div>
</div>
<div class="item">
<h2>Slide 4</h2>
<div class="carousel-caption">
<img src="Materialien/erde.jpg" class="img-responsive">
<h3>Vierter Slider</h3>
<p>Aliquam sit amet gravida nibh, facilisis gravida odio.</p>
</div>
</div>
</div>
</div>
</div>
this part should be into class="item"
<img src="Materialien/erde.jpg" class="img-responsive">
any text describing the picture or something should be into class="carousel-caption".
if you want the text to be on the left side then
<div class="carousel-caption" style="text-align:left;">