If I put the div where I draw the graph the "style = display: none" attribute, this resizes my chart in half.
<div id='chart_div_inmediata' style='width: 900px; height: 300px;display:none'></div>
Result :
<div id="chart_div_inmediata" class="google-visualization-atl container" style="width: 900px; height: 300px; display: none;">
<div class="" style="position: relative; width: 400px; height: 200px;">
</div>
How do I fix this? Thank!
Related
I am trying to get the hero and footer sorta fixed, so when the page is scrolled, the content will roll over the (unmoving) hero and when you get to the end of the contents, the also unmoving footer will be revealed.
I have messed with data-scroll-sticky and data-scroll-target with no success. Can anyone shed a light?
Any help is appreciated!
Codepen
<section scrollContainer>
<div scrollSection class="panel hero">hero</div>
<div scrollSection class="panel cont1">content</div>
<div scrollSection class="panel cont2">more content</div>
<div scrollSection class="panel cont3">even more content</div>
<div scrollSection class="panel footer">footer</div>
</section>
This Way You Can Use Sticky Footer
<div data-scroll-section class="sticky-footer">
<div class="fixed-target" id="fixed-target"></div>
<div class="fixed-element" data-scroll data-scroll-sticky data-scroll-target="#fixed-target">
<div class="container">....</div>
</div>
</div>
CSS
.sticky-footer {
position: relative;
overflow: hidden;
height: 100vh;
}
.fixed-target {
bottom: -100vh;
}
.fixed-element,
.fixed-target {
position: absolute;
top: -100vh;
right: 0;
left: 0;
}
.fixed-element {
height: 100%;
width: 100%;
background: url(../img/black2.jpg);
background-color: black;
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
}
it's work perfect when slides first index to last but when auto loop go to last index to first index click property is not working.
<ion-slides *ngIf="slides != null" autoplay="3000" loop="true" speed="800" >
<ion-slide *ngFor="let slide of slides" >
<img [src]="slide.BannerImage">
<div class="con-box">
<h2>{{slide.BannerName}}</h2>
<br/>
<button ion-button color="btn" (click)="fnGotoNewArrivalList(slide.CollectionID,slide.BannerName)">Order Now</button>
</div>
</ion-slide>
</ion-slides>
#jatin devani please try this code..
replace ion-slides in place use swiper
html
<!-- Swiper -->
<swiper class="swiper-container" [config]="config" #usefulSwiper>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">Slide 1</div>
<div class="swiper-slide">Slide 2</div>
<div class="swiper-slide">Slide 3</div>
<div class="swiper-slide">Slide 4</div>
<div class="swiper-slide">Slide 5</div>
<div class="swiper-slide">Slide 6</div>
<div class="swiper-slide">Slide 7</div>
<div class="swiper-slide">Slide 8</div>
<div class="swiper-slide">Slide 9</div>
<div class="swiper-slide">Slide 10</div>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination"></div>
<!-- Add Arrows -->
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
</swiper>
index.html
<script src="assets/js/swiper.jquery.min.js"></script>
<script src="assets/js/swiper.min.js"></script>
.ts file
config:any;
this.config = {
paginationClickable: true,
spaceBetween: 30,
centeredSlides: true,
autoplay: 2500,
autoplayDisableOnInteraction: false,
initialSlide : 0,
slidesPerView: 1,
// paginationType: 'progress',
// pagination: '.swiper-pagination',
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
};
css file
html, body {
position: relative;
height: 100%;
}
body {
background: #eee;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 14px;
color:#000;
margin: 0;
padding: 0;
}
.swiper-container {
width: 100%;
height: 100%;
}
.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;
/* Center slide text vertically */
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
I'm trying to vertically align my text on my screen. I've read through the docs on how to do this. But I'm still not having any luck. This is my code:
<div class="row">
<div class="col col-center text-center">
<h4 class="gray">This text is in the center of the screen</h4>
</div>
</div>
HTML
<div class="row">
<div class="col">
<div class="text-center">
<h5 style="text-align: center;">This text is in the center of the screen</h5>
</div>
</div>
</div>
This works on Ionic Framework 3.0.1:
HTML:
<ion-content padding>
<div>
<h4 class="gray">This text is in the center of the screen</h4>
</div>
</ion-content>
SASS:
ion-content {
div {
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
}
Try this solution:
1.Add new css styles:
.home .scroll-content {
display: table !important;
width: 100% !important;
height: 100% !important;
margin-top: -50px; /* the height of the centered content */
text-align: center;
}
.home .scroll {
display: table-cell;
vertical-align: middle;
}
2.Apply home class to ion-view:
<ion-view class="home">
demo
How about specify the "height"?
Anyway, centralize your text in horizontal, you can also use align="center".
(To make it clear, I added the color to row and col.)
<div class="row" style="height: 900px; background-color: blue;">
<div class="col col-center" style="background-color: red;>
<h4 class="gray" align="center">This text is in the center of the screen</h4>
</div>
</div>
The full JavaScript error is:
Timestamp: 6/4/2015 8:52:37 AM
Error: Error: prototype of 'thumbnavigator' not defined.
Source File: http://webanautics.com/invoice/slider-master/js/jssor.js
Line: 69
I have read the other answers to the same question, but the answers don't work for my particular code.
I'm using the tabs-slider example, enter link description here
My Slides Container looks like this:
<!-- Slides Container -->
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 29px; width: 900px; height: 600px; border: 1px solid gray; -webkit-filter: blur(0px); background-color: #fff; overflow: hidden;">
<div>
<div style="margin: 10px; overflow: hidden; color: #000;">
<?php $week = -1; include("includes/invoice-week-module.php"); ?>
</div>
<div u="thumb">Last Week</div>
</div>
<div>
<div style="margin: 10px; overflow: hidden; color: #000;">
<?php $week = 0; include("includes/invoice-week-module.php"); ?>
</div>
<div u="thumb">This Week</div>
</div>
<div>
<div style="margin: 10px; overflow: hidden; color: #000;">
<?php $week = 1; include("includes/invoice-week-module.php"); ?>
</div>
<div u="thumb">Next Week</div>
</div>
</div>
This is my thumbnavigator div block:
<div u="thumbnavigator" class="jssort12" style="left:0px; top: 0px;">
<!-- Thumbnail Item Skin Begin -->
<div u="slides" style="cursor: default; top: 0px; left: 0px; border-left: 1px solid gray;">
<div u="prototype" class="p">
<div class=w><div u="thumbnailtemplate" class="c"></div></div>
</div>
</div>
<!-- Thumbnail Item Skin End -->
</div>
<!--#endregion ThumbnailNavigator Skin End -->
When this error happens, any other JavaScript afterwards doesn't work.
does anyone know how to use a single H1 tag effectively in a Jssor full width slider so that the tag also stretches and resizes with the slider when browser resizes?
Please just do it as what you can imagine. See following,
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 1300px;
height: 500px; overflow: hidden;">
<div>
<img u="image" src="../img/1920/red.jpg" />
<h1>your content here</h1>
</div>
<div>
<img u="image" src="../img/1920/red.jpg" />
<h1>your content here</h1>
</div>
</div>