In this code i am preparing a portfolio, now when i am placing an
image in my portfolio the image is not filling the border div and
going a side as you can see in the picture <IMAGE-first half> , <IMAGE-second half>. Can someone help me to keep four images that has borders only to the image and I need all four images placed like four boxes?
<section class="latestwork" id="work">
<div class="container">
<div class="row">
<div class="heading">
<h2 class="boxx">My Latest Work</h2>
<h6>These are my latest mobile photography captures</h6>
</div>
</div>
<div class="row">
<div class="myworkbuttons">
<button type="button" class="myworklink" data-filter="all">All</button>
<button type="button" class="myworklink" data-filter="creative">Creative</button>
<button type="button" class="myworklink" data-filter="black&white">Black/white</button>
<button type="button" class="myworklink" data-filter="portrait">Portraits</button>
</div>
</div>
<div class="row">
<div class="portfolio-items" data-category="urban-floods">
<div class="portfolio-inner-item" style="">
<div class="portfolio-img">
<img src="C:\portfolio's\drive-download-20210208T164603Z-001\The Disaster of 2020.jpg" alt="Image not loading">
</div>
</div>
<div class="portfolio-info">
<h4>Iso: </h4>
</div>
</div>
<div class="portfolio-items" data-category="buffalo">
<div class="portfolio-inner-item">
<div class="portfolio-img">
<img src="C:\portfolio's\drive-download-20210208T164603Z-001\buffalos path.jpg" style="float: left;" alt="Image not loading">
</div>
</div>
</div>
</div>
This is happening because the size of the image is not big enough.
Try adding width: 100% of the image component.
you can use grid and and use css importing file and try this code: .div{background-image: url("/assets/pics/picture.jpg"); background-position: center; background-repeat: no-repeat; background-size: cover; min-height:50vh; min-width:50vw }//(or what size do you need.);
Related
I have a page that displays a lot of divs, in 2 by x grid.. this is the code:
<div class="row d-flex justify-content-around" >
#foreach(auth()->user()->galleries as $gallery)
<div class="col-5
mb-5
p-3
rounded-lg
shadow
d-flex
justify-content-between
align-items-baseline
"
style="background-color: lightgrey;
background-size: 100%;
background-position: center;">
<div class="w-75">
<div class="">
<h2>{{$gallery->galname}}</h2>
</div>
<div class="">
SOME CONTENT...
</div>
</div>
<div class="my-auto">
<div class="d-flex justify-content-around p-1">
<button class="btn btn-primary" type="button" onclick="window.location='/gallery/{{ $gallery->id }}'">View / Edit</button>
</div>
</div>
</div>
#endforeach
</div>
So far it works great, but if i reduce the size of the browser or watch it on a cellphone, then they squish toghether.. I would like it to be responsive and jump to the next row if there is not enoguh space available.. so the 2 by x becomes a 1 by 2x table... how can this be done?
You may add classes for the responsive design after col-5, i.e. col-sm-10 which will change the size of the div in small screens.
.... class="col-5 col-sm-10 mb-5 ...
more info here
I know little about Laravel and Masonry grid layout, but I know how Bootstrap framework works.
I need to change the number of columns in a Boostrap grid for small size devices like a mobile phone. Currently, the number of columns is 3 because the class used is col-xs-4. However, I need to change it to col-xs-6, so that it shows 2 columns.
I don't think it's that hard, but I don't know how Laravel works.
I tried searching for those divs in the whole project so that I could directly change those classes, but I couldn't find anything.
This is an example of one column in a row:
<div class="container-fluid">
<div class="row">
<div class="fw-divider-space hidden-below-xl pt-70"></div>
<div class="col-lg-12">
<div data-animation="fadeInDown" class="row isotope-wrapper masonry-layout c-gutter-5 c-mb-5 animate animated fadeInDown" style="position: relative; height: 798px;">
<div class="col-sm-3 col-lg-3 col-lgx-3 col-xl-3 col-xs-4 col-4" style="position: absolute; left: 0%; top: 0px;">
<div class="vertical-item item-gallery content-absolute text-center ds">
<a href="https://www.tusencuentros.cl/modelo/9/ver" class="item-media h-100 w-100 d-block"><img src="https://www.tusencuentros.cl/storage/fotos_perfil/9-1.jpg" alt="Modelo">
<div class="media-links"></div>
</a>
<img src="https://clubvip.cl/storage/watsapp_logo.png" style="width: 40px; height: 40px; margin-top: 5px;"> <i aria-hidden="true" class="fa fa-phone-square" style="font-size: 36px; color: rgb(255, 255, 255); float: right;"></i>
<div class="item-content" style="background-color: rgb(233, 11, 165);">
<div class="item-title" style="top: -80px; width: 100%;">
<div style="display: inline-flex;">
<p style="font-size: 14px;">CARLITA </p>
</div>
<div>
<p style="font-size: 12px;">CHILENA, 20</p>
</div>
<div>
<p style="font-size: 10px;">Medidas: 94-62-98</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
I expect the classes col-xs-4 to be col-xs-6.
I assume you use laravel blade
You can use dynamic css class in here like
class="col-sm-3 col-lg-3 col-lgx-3 col-xl-3 {{ $isMobile ? 'col-xs-6' : 'col-xs-4' }} col-4"
In the curly blackets : is this mobile device? if yes, I will use col-xs-6 if not I will use col-xs-4
But you need to send the checking of $isMobile from your controller and there is a very simple component for that here jenssegers/agent
After installation you can perform check for mobile device by using $agent->isMobile() method
Finally I could fix it by finding out that the folder with the file that contains those divs was inside a non-public location called "resources". Since I know little about Laravel Blade, I didn't know the directory structure.
I have made the following grid in Bootstrap 4:
<div class="container-fluid">
<div class="row padding">
<div id="workshop1" class="col-lg-6 nopadding">
<img src="images/Werkstatt/image_05.jpg" class="img-fluid nopadding" alt="">
</div>
<div class="col-lg-6">
<div class="row">
<div id="workshop2" class="col-lg-6 nopadding">
<img src="images/Werkstatt/image_06.jpg" class="img-fluid nopadding" alt="">
</div>
<div id="workshop3" class="col-lg-6 nopadding">
<img src="images/Werkstatt/image_08.jpg" class="img-fluid nopadding" alt="">
</div>
</div>
<div class="row">
<div id="workshop4" class="col-lg-6 nopadding">
<img src="images/Werkstatt/image_09.jpg" class="img-fluid nopadding" alt="">
</div>
<div id="workshop5" class="col-lg-6 nopadding">
<img src="images/Werkstatt/image_07.jpg" class="img-fluid nopadding" alt="">
</div>
</div>
</div>
</div> <!-- end of first row -->
<div class="row padding">
<div id="workshop6" class="col-lg-3 nopadding">
<img src="images/Werkstatt/image_01.jpg" class="img-fluid nopadding" alt="">
</div>
<div id="workshop7" class="col-lg-3 nopadding">
<img src="images/Werkstatt/image_04.jpg" class="img-fluid nopadding" alt="">
</div>
<div id="workshop8" class="col-lg-3 nopadding">
<img src="images/Werkstatt/image_02.jpg" class="img-fluid nopadding" alt="">
</div>
<div id="workshop9" class="col-lg-3 nopadding">
<img src="images/Werkstatt/image_03.jpg" class="img-fluid nopadding" alt="">
</div>
</div> <!-- end of second row -->
</div>
The css file looks like this:
.nopadding {
padding-left: 0;
padding-right: 0;
}
Now I have the problem, that there is a small white line between the right part of row 2 and row 3 in Safari and Chrome on my Mac. In Firefox everything looks fine:
Firefox
Chrome & Safari
Does anybody have an idea how fix this? All browsers are up to date.
Thanks in advance.
Regards
Lars
Try adding display: block; to your images or float: left;
Sometimes trying font-size: 0; or line-height: 0; works.
The page that Im trying to scrape looks like the code below.
Based on text scraped and verified from one DIV, I need to scrape value from following DIV.
I have the right XPath to get the DIV that I need to verify, however, I cannot figure out how to get the text from the adjacent DIV?
<h3>TableWithColumnsAndRowsDIVstyle</h3>
<div class="row row-flex rowLine" style="padding: 2px 0;">
<div class="col-1 vcenter">
::before
<h4 style="white-space: nowrap;">
RowValueNameX
</h4>
</div>
<div class="col-2 vcenter text-right">
::before
<h4>
<b>RowValueX_ThatINeedToExtract</b>
</h4>
</div>
::after
</div>
<div class="row row-flex rowLine" style="padding: 2px 0;">
<div class="col-1 vcenter">
::before
<h4 style="white-space: nowrap;">
RowValueNameY
</h4>
</div>
<div class="col-2 vcenter text-right">
::before
<h4>
<b>RowValueY_ThatINeedToExtract</b>
</h4>
</div>
::after
</div>
<div class="row row-flex rowLine" style="padding: 2px 0;">
<div class="col-1 vcenter">
::before
<h4 style="white-space: nowrap;">
RowValueNameZ
</h4>
</div>
<div class="col-2 vcenter text-right">
::before
<h4>
<b>RowValueZ_ThatINeedToExtract</b>
</h4>
</div>
::after
</div>
The XPath that I have looks like this
//*[contains(normalize-space(text()),"RowValueNameX")]
Now I need to get this text
RowValueX_ThatINeedToExtract
To select the first divblock containing the text are looking for, you can use:
//div[contains(div, "RowValueNameX")]
This gives:
<div class="row row-flex rowLine" style="padding: 2px 0;">
<div class="col-1 vcenter">
::before
<h4 style="white-space: nowrap;">
RowValueNameX
</h4>
</div>
<div class="col-2 vcenter text-right">
::before
<h4>
<b>RowValueX_ThatINeedToExtract</b>
</h4>
</div>
::after
</div>
You want the second div child, so the complete XPath looks like this:
//div[contains(div, "RowValueNameX")]/div[2]
This results in:
<div class="col-2 vcenter text-right">
::before
<h4>
<b>RowValueX_ThatINeedToExtract</b>
</h4>
</div>
From here it should be easy to get to the text you actually want.
I have difficulties to add border to the last class="separator" from the last class="list-group".
I want to do this in SASS. Can someone please help me, because my solution doesn't work.
HTML
<div class="list-group">
<div class="list-group-item"></div>
<div class="separator"></div>
</div>
<div class="list-group">
<div class="list-group-item"></div>
<div class="separator"></div>
</div>
<div class="list-group">
<div class="list-group-item"></div>
<div class="separator"></div>
</div>
<div class="list-group">
<div class="list-group-item"></div>
<div class="separator"></div>
</div>
CSS
.list-group {
&:last-child .separator {
border-left: 1px solid black;
}
}
According to me there is no problem in your sass code. Just add some content into html and the browser will start showing border. Something like this
<div class="list-group">
<div class="list-group-item"></div>
<div class="separator">item1</div>
</div>
<div class="list-group">
<div class="list-group-item"></div>
<div class="separator">item2</div>
</div>
<div class="list-group">
<div class="list-group-item"></div>
<div class="separator">item3</div>
</div>
<div class="list-group">
<div class="list-group-item"></div>
<div class="separator">item4</div>
</div>
Output (for your reference):
can you spot the left border on item4?
This worked for me.
I know it's too late xd
.list-group {
.separator:last-child {
border-left: 1px solid black;
}
}