How do I get a div to overflow and not extend the page using flex box? - vue.js

Here is my code:
<template>
<div class="main-column d-flex flex-column h-100">
<div class="pl-3 pr-3">
<filter-panel ref="filterComp" :controls="filterControls" :urlParams="$route.query" #filterResults="onSearchClicked" />
</div>
<div class="flex-grow-1 d-flex flex-column px-1 py-2 bg-container">
<div class="position-relative h-100">
<div class="absoluteFill">
<div class="collapse-panel nested-background mb-2 w-100">
<div class="collapse-bar full-length">
<b-button class="buttonRow w-100 py-0 d-flex justify-content-between" size="sm" variant="link" #click="hideGraphs = !hideGraphs" v-b-toggle.count-collapse>
<span class="title">Chart</span>
<icon :class="{'down': hideGraphs}" class="icon rotate mt-1" icon="chevron-up" size="lg" />
</b-button>
</div>
<b-collapse id="count-collapse" visible>
<transition name="fade" mode="out-in">
<div>
<DxChart :data-source="graphData"
palette="Material"
class="p-3">
<DxCommonSeriesSettings type="bar" argument-field="date">
<DxLabel>
<DxFormat :precision="0" type="fixedPoint" />
</DxLabel>
</DxCommonSeriesSettings>
<DxSize :height="350" />
<DxSeries name="Mapping Client"
value-field="mappingClient"
color="#a4de02" />
<DxSeries name="Mapping ISCI"
value-field="mappingIsci"
color="#add8e6" />
<DxSeries name="Mapping Product"
value-field="mappingProduct"
color="#ff0000" />
<DxLegend :visible="true" />
<DxTooltip :enabled="true" />
</DxChart>
</div>
</transition>
</b-collapse>
</div>
<!--Grid card-->
<div class="collapse-panel nested-background mb-2 d-flex flex-column w-100 ">
<div class="collapse-bar full-length">
<b-button class="buttonRow w-100 py-0 d-flex justify-content-between" size="sm" variant="link" #click="hideGrids = !hideGrids" v-b-toggle.counts-collapse>
<span class="title">Grids</span>
<icon :class="{'down': hideGrids}" class="icon rotate mt-1" icon="chevron-up" size="lg" />
</b-button>
</div>
<b-collapse id="counts-collapse" visible>
<transition name="fade" mode="out-in">
<dx-tab-panel ref="tabPanel" :items="tabs">
<div slot="title" class="wordwrap" slot-scope="tab">{{tab.data.title}}</div>
<div slot="item" slot-scope="tab">
<span v-if="isTab(tab, 0)">
<data-summary :graphData="graphData"></data-summary>
</span>
<span v-if="isTab(tab, 1)"><user-data :rawData="rawData"></user-data></span>
</div>
</dx-tab-panel>
</transition>
</b-collapse>
</div>
</div>
</div>
</div>
</div>
I need the last table to have an overflow inside the div and not scroll the page. I also need that div to expand if the chart is minimized. I have been trying to solve this all day I'm out of answers, I feel like this should be a super simple fix but I just can't get it.
Thanks for any help!

Related

Tailwind elements carousel two column content with image

I modify the tailwind elements carousel with two columns left column with content and a right column with image. All functionality is correct but the problem is responsivity.
How can I modify this carousel so that I change the resolution to md or sm I get columns vertical?
I tried to do flex flex-row and when i change the resolution to md or sm to be flex flex-col and nothing changed the same with grid grid-cols-2 and after changing to md and sm to grid-cols-1
This is my code
<div id="carouselExampleCaptions" class="carousel slide relative" data-bs-ride="carousel">
<div class="carousel-indicators absolute right-0 bottom-0 left-0 flex justify-center p-0 mb-4">
<button
type="button"
data-bs-target="#carouselExampleCaptions"
data-bs-slide-to="0"
class="active"
aria-current="true"
aria-label="Slide 1"
></button>
<button
type="button"
data-bs-target="#carouselExampleCaptions"
data-bs-slide-to="1"
aria-label="Slide 2"
></button>
<button
type="button"
data-bs-target="#carouselExampleCaptions"
data-bs-slide-to="2"
aria-label="Slide 3"
></button>
</div>
<div class="carousel-inner relative w-full overflow-hidden">
<div class="carousel-item active relative float-left w-full">
<img
src="https://mdbootstrap.com/img/Photos/Slides/img%20(15).jpg"
class="block w-1/4 h-96 float-right mr-80"
alt="..."
/>
<div class="carousel-caption hidden md:block absolute text-left h-96 ">
<h1 class="font-bold text-4xl lg:text-6xl text-blue-900 leading-tight font-poppins pb-4 ">SOME TEXT</h1>
<p class="text-gray-500">Some representative placeholder content for the first slide.</p>
</div>
</div>
<div class="carousel-item relative float-left w-full">
<img
src="https://mdbootstrap.com/img/Photos/Slides/img%20(22).jpg"
class="block w-1/4 h-96 float-right mr-80"
alt="..."
/>
<div class="carousel-caption hidden md:block absolute text-left h-96">
<h1 class="font-bold text-4xl lg:text-6xl text-blue-900 leading-tight font-poppins pb-4">SOME TEXT 1</h1>
<p class="text-gray-500">Some representative placeholder content for the second slide.</p>
</div>
</div>
<div class="carousel-item relative float-left w-full">
<img
src="https://mdbootstrap.com/img/Photos/Slides/img%20(23).jpg"
class="block w-1/4 h-96 float-right mr-80"
alt="..."
/>
<div class="carousel-caption hidden md:block absolute text-left h-96">
<h1 class="font-bold text-4xl lg:text-6xl text-blue-900 leading-tight font-poppins pb-4">SOME TEXT 2</h1>
<p class="text-gray-500">Some representative placeholder content for the third slide.</p>
</div>
</div>
</div>
<button
class="carousel-control-prev absolute top-0 bottom-0 flex items-center justify-center p-0 text-center border-0 hover:outline-none hover:no-underline focus:outline-none focus:no-underline left-0 text-black"
type="button"
data-bs-target="#carouselExampleCaptions"
data-bs-slide="prev"
>
<span class="carousel-control-prev-icon inline-block bg-no-repeat" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button
class="carousel-control-next absolute top-0 bottom-0 flex items-center justify-center p-0 text-center border-0 hover:outline-none hover:no-underline focus:outline-none focus:no-underline right-0 text-black"
type="button"
data-bs-target="#carouselExampleCaptions"
data-bs-slide="next"
>
<span class="carousel-control-next-icon inline-block bg-no-repeat" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>

selenium : how to click() elements inside div data-marker=""

I have this element where the code of the content is not inside normal html marks but inside a data-marker attribute of div :
<div class="profil-block d-flex firm" data-lat="45.812122" data-lon="3.112388" data-title="AGC CEGESMA" data-marker="<div class="profil-block firm w-auto m-0 p-0 no-box-shadow">
<a href="/expert-comptable/5213-agc-cegesma-clermont-ferrand-63100" class="d-block text-center">
<img class="avatar" src="/build/images/content/cabinet-anonyme.aa87fff0.svg"/>
</a>
<div class="name w-auto mt-2">
<a href="/expert-comptable/5213-agc-cegesma-clermont-ferrand-63100" class="text-decoration-none">AGC CEGESMA</a>
</div>
<span class="address">
<svg class="primary-red-icon mb-1" width="18" height="18">
<use xlink:href="/build/images/design/icon-lieu-sprite.be93487d.svg#icon-lieu"/>
</svg>
Clermont-Ferrand (63100)
</span>
<div class="info d-flex flex-row mt-2 justify-content-between align-items-center">
<div class="d-flex">
<span role="button" class="icon-block mr-2 firm-phone cursor-pointer" data-id="260000451205">
<svg class="icon icon-tel"><use xlink:href="/build/images/design/contact-icons-sprite.7e44022e.svg#icone-tel"></use></svg>
</span>
<span role="button" class="icon-block firm-contact cursor-pointer" data-id="260000451205">
<svg class="icon icon-mail"><use xlink:href="/build/images/design/contact-icons-sprite.7e44022e.svg#icone-mail"></use></svg>
</span>
</div>
<a href="/expert-comptable/5213-agc-cegesma-clermont-ferrand-63100" class="d-flex flex-column text-decoration-none">
<span class="knowMore">En savoir</span>
<img src="/build/images/design/plus.b2364558.svg" class="icon-more">
</a>
</div>
</div>
">
<div class="d-flex align-items-start">
<a href="/expert-comptable/5213-agc-cegesma-clermont-ferrand-63100" title="En savoir plus sur le cabinet AGC CEGESMA">
<img src="/build/images/content/cabinet-anonyme.aa87fff0.svg" class="avatar" alt="AGC CEGESMA – Expert-comptable logo">
</a>
<div class="d-desktop-none">
<h3 class="name">
AGC CEGESMA
</h3>
<span class="address">
<svg class="primary-red-icon mb-1" width="18" height="18">
<title>Adresse</title>
<use xlink:title="" xlink:href="/build/images/design/icon-lieu-sprite.be93487d.svg#icon-lieu"></use>
</svg>
Clermont-Ferrand (63100)
</span>
</div>
</div>
<div class="d-flex flex-column justify-content-between -medium">
<div class="d-desktop-block">
<div class="name">
AGC CEGESMA
</div>
<span class="address">
<svg class="primary-red-icon mb-1" width="18" height="18">
<title>Adresse</title>
<use xlink:href="/build/images/design/icon-lieu-sprite.be93487d.svg#icon-lieu"></use>
</svg>
Clermont-Ferrand (63100)
</span>
</div>
<div class="competence-list">
<div class="competence ">RAY François</div>
</div>
</div>
<div class="info d-flex justify-content-between">
<div class="d-flex">
<div role="button" class="icon-block mr-2 firm-phone cursor-pointer" data-id="260000451205" title="Contacter le cabinet AGC CEGESMA par téléphone">
<svg class="icon icon-tel"><use xlink:href="/build/images/design/contact-icons-sprite.7e44022e.svg#icone-tel"></use></svg>
</div>
<div role="button" class="icon-block firm-contact cursor-pointer" data-id="260000451205" title="Contacter le cabinet AGC CEGESMA par mail">
<svg class="icon icon-mail"><use xlink:href="/build/images/design/contact-icons-sprite.7e44022e.svg#icone-mail"></use></svg>
</div>
</div>
<a href="/expert-comptable/5213-agc-cegesma-clermont-ferrand-63100" class="d-flex flex-column text-decoration-none" title="En savoir plus sur le cabinet AGC CEGESMA">
<span class="knowMore">En savoir</span>
<img src="/build/images/design/plus.b2364558.svg" class="icon-more">
</a>
</div>
</div>
I can retrieve the content with driver.find_elements(by=By.XPATH, value='//div[#class="profil-block d-flex firm"]').get_attribute('data-marker'), but then how to i select some buttons for example inside this attribute?
I need selenium to click a link inside this data-marker code
Thank you
I don't think it is possible to click on an element thats only in the data-marker. In your situation though you can just locate this element:
This code should work for locating that element:
driver.find_elements(by=By.XPATH, value='//div[#class="icon-block firm-contact cursor-pointer"]')

create card carousel using bootstrap 5.2 carousel and vue 3

I have this css code in my vue 3 component template
<div class="row mt-5 pt-5 m-0" id="carouselRow">
<!-- <div class="col-sm-12 col-md-12 col-lg-12 p-md-0"> -->
<div id="carouselExampleCaptions" class="carousel slide" data-bs-ride="true">
<!-- <div class="carousel-indicators">
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
</div> -->
<div class="carousel-inner">
<div class="row m-0" v-for="( doctor, i ) in featuredDoctors.slice(0, 10)" :key="i">
<div class="carousel-item" :class="i === 0 ? 'active':''" id="doctorCard" >
<div class="col-md-4 col-lg-4">
<div class="card">
<img :src="doctor.propicUrl" class="img-fluid" width="150" alt="">
<div class="card-body">
<h5>{{ doctor.name }} {{ doctor.surname }}</h5>
<p>{{ doctor.category }}</p>
</div>
</div>
</div>
</div>
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<!-- </div> -->
</div>
I want to create a simple card carousel but at the moment I'm unable to use the right markup and I will see only one card in a crappy way, but on the dom the loop has rendered all the cards I want display.
How I can make a v-for loop that works fine and will render 3 bootstrap 5.2 cards for each carousel item into the array that will be looped?
I think you placed the v-for on the wrong item.
Vue is rendering now rendering this several times:
<div class="row m-0" v-for="( doctor, i ) in featuredDoctors.slice(0, 10)" :key="i">
<div class="carousel-item" :class="i === 0 ? 'active':''" id="doctorCard" >
<div class="col-md-4 col-lg-4">
<div class="card">
<img :src="doctor.propicUrl" class="img-fluid" width="150" alt="">
<div class="card-body">
<h5>{{ doctor.name }} {{ doctor.surname }}</h5>
<p>{{ doctor.category }}</p>
</div>
</div>
</div>
</div>
</div>
But you only need this:
<div class="carousel-item" :class="i === 0 ? 'active':''" id="doctorCard" >
<div class="col-md-4 col-lg-4">
<div class="card">
<img :src="doctor.propicUrl" class="img-fluid" width="150" alt="">
<div class="card-body">
<h5>{{ doctor.name }} {{ doctor.surname }}</h5>
<p>{{ doctor.category }}</p>
</div>
</div>
</div>
</div>
Try it with this:
<div class="carousel-item" :class="i === 0 ? 'active':''" id="doctorCard" v-for="( doctor, i ) in featuredDoctors.slice(0, 10)" :key="i">

V-if And V-else aren't working how I want it to. i want to hide one section when the other section is true

I want to hide one section when the other section is true, but I'm not sure if I'm using v-if and v-else in the right way. I tried rearranging the divs with the v-if but no combination I tried works for hiding the div in the way I want.
<template>
<section id="whiteClawVideo" class="videoWrapper d-block w-100">
<div class="video-container fluid">
<iframe width="100%" height="600" src="https://www.youtube.com/embed/JORN2hkXLyM?autoplay=1&loop=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</section>
<form #submit.prevent="SearchMovies()" class="search-box">
<input type="text" placeholder="What are you looking for? " v-model="search" />
<input type="submit" value="Search">
</form>
<div class="movies-list" v-if="search.value !=''" >
<div class="movie" v-for="movie in movies" :key="movie.imdbID">
<router-link :to="'/movie/'+movie.imdbID" class="movie-link">
<img :src="movie.Poster" alt="Movie Poster" />
<div class="type">{{ movie.Type }}</div>
<div class="detail">
<p class="year">{{movie.Year}}</p>
<h3>{{ movie.Title }}</h3>
<p>{{movie.imdbID}}</p>
</div>
</router-link>
</div>
</div>
<div class="container" v-else>
<MovieSection />
<SecondMovieSection />
</div>
Change your v-if to just search !== '' since that's your model

How do I fix my navbar in bootstrap vue to be in centre?

How can I put my navbar component in the centre? This is my first time doing this I got most of it ok but I just can't seem to fix this problem so it doesn't look weird
<template>
<div class="container">
<header>
<h1>GIF'S APP</h1>
<form>
<span class="font-semibold mr-2 text-left flex-auto text-white">Search for the coolest gifs</span>
<div>
<b-nav-form>
<b-input-group>
<b-form-input id="input-small" size="sm" type="text" v-model="search" />
<b-button class="btn-success" type="button" v-on:click="searchNewGifs()">Search</b-button>
<div class="gifs--container">
<Gif v-for="gif in gifs" v-bind:key="gif.id" v-bind:data="gif"></Gif>
</div>
<b-button
class="btn-success"
type="button"
v-if="!stopNextPage"
v-on:click="getNextPage()"
>Next Page</b-button>
</b-input-group>
</b-nav-form>
</div>
</form>
</header>
</div>
</template>
use class mx-auto horizontal centre and class my-auto for vertical centre and if you you want to make horizontal and vertical centre use m-auto and NOTE: very important is that the parent have the style dispaly: flex and the class available for that is d-flex.