I am building a complex page with multiple sections based on the latest fullpage.js release (developer license). I have 3 full-height sections with auto scroll and then 3 more sub-sections. In the code it basically looks like this:
<div id="fullpage">
<div class="section">content</div>
<div class="section">content</div>
<div class="section">content</div>
...
<div class="section sub-section">content</div>
<div class="section sub-section">content</div>
<div class="section sub-section">content</div>
</div>
I want these sub-sections to have a normal scroll, is this possible?
Not something fullPage.js provides yet.
The most you can do is include all those last sections inside the last section of your site and then use scrollOverflow:true to emulate the normal scroll behaviour as in this example.
See this demo online
<div id="fullpage">
<div class="section">content</div>
<div class="section">content</div>
<div class="section">content</div>
<div class="section">
<div class="sub-section">sub content</div>
<div class="sub-section">sub content</div>
<div class="sub-section">sub content</div>
</div>
</div>
Using something like this:
sub-section{
height: 100vh;
width: 100%;
}
.sub-section{
background: red;
}
.sub-section:nth-child(1){
background: red;
}
.sub-section:nth-child(2){
background: blue;
}
Related
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.
What is the best way to Change width of drop down in semantic UI, so that it will be responsive.
<div id="city" class="colomn ui search selection dropdown" style="min-width: 121px; white-space: nowrap; max-width: 251px;">
<input type="hidden" name="country">
<i class="dropdown icon"></i>
<div class="default text">Select City</div>
<div class="menu">
<div class="item" data-value="Ahmedabad">Ahmedabad</div>
<div class="item" data-value="Bangalore">Bangalore</div>
<div class="item" data-value="Chennai">Chennai</div>
<div class="item" data-value="Delhi">Delhi</div>
<div class="item" data-value="Hyderabad">Hyderabad</div>
<div class="item" data-value="Kolkata">Kolkata</div>
<div class="item" data-value="Mumbai">Mumbai</div>
</div>
</div>
<style>
.ui.dropdown>.text {
display: block !important;
overflow: hidden;
}
</style>
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;
}
}
I can't understand why is the background pattern opacity lowers the opacity of the text which is above it (Article Name and Article). How to make text with 0% opacity and background opacity 32%?
This is my code:
<body>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3">
<div class="main-content">
<h1 class="logo margin-section">Article Name</h1>
<p>Article</p>
</div>
</div>
</div>
And CSS looks like this:
.col-sm-3 {
background-image: url(../images/pattern.png); opacity: 0.32;
margin-left: 7%;
}
I have a small website using Bootstrap 3.0 RC1 and I am just trying to center a simple image (with responsive rendering)
So everything seems to work on desktop devices, but when I look at my website on a small device like a mobile, the image is resized (thats good) but NOT perfectly centered.....
I am puzzled..
Any idea?
Many thanks in advance,
I use the following code :
<body style="display: block;">
<section class="container">
<header>
<div class="row">
<div class="col-lg-6 col-offset-3">
<center><img src="img/grey_wash_wall.png" class="text-center" title="Hello" alt="World"></center>
</div>
</div>
<div class="row">
<div class="title col-lg-12">
<h1>Welcome to my website</h1>
</div>
</div>
</header>
You're missing a closing bracket on your .container CSS.
.container {
max-width: 700px;
background:white;
padding: 30px 50px;
margin: 20px auto;
text-align: center;
}
EDIT:
I'm unable to replicate this behavior on a mobile-sized browser window using the markup you provided. jsFiddle