I have a slider with fixed image sizes (all pictures are the same size), and need to know please if it is possible to overlay the slider container with a frame that has a transparent middle to let the slides underneath show through. Adding the frame to each individual slide image doesn't look good, because the frame is then "ripped apart" by the image transitions. I need a frame "overlay" that stays in place and intact above the individual slides.
Any help or advice would be greatly appreciated.
You can add anything in a slider container. And you can add static content in slides container. And you can add static content in any slide.
<div id="slider1_container" ...>
<!-- custom background here
<div ...>...</div>
-->
<div u="slides" ...>
...
<!-- custom overlay here
<div u="any" ...>...</div>
-->
</div>
<!-- custom overlay here
<div ...>...</div>
-->
</div>
Related
I need to add only one image to the carousel through materialize css, but that image should stay in its position without moving when clicked on the space around the image.
<div class="carousel" >
<a class="carousel-item" href="#one!"><img src="https://lorempixel.com/250/250/nature/1"></a>
</div>
$(document).ready(function() {
$('.carousel').carousel();
});
I am able to display one image in the carousel but the image is hiding when clicked on the space around the image.
I'm trying to use Skrollr to fix an element to the bottom of the viewport, if the bottom of the element hits the viewport bottom. This part is fine.
The problem is, after - lets say 1000px - of scrolling, i want to continue the scrolling, while i change the above mentioned fixed element to static again.
<div class="header">Header</div>
<div class="height-placeholder" data-anchor-target="#fixed-element" data-0-bottom="display:none;" data--0-bottom="display:block;"></div>
<div id="fixed-element" data-0="#class:;" data-bottom="#class:stuck;" data-1000="#class:;">Fixed at the bottom for a while</div>
<div class="content">
Regular content...<br>
</div>
http://jsfiddle.net/bkccg8x5/2/
So my idea was to create a placeholder above the fixed element and when the fixed element is stuck to the bottom, i simply add this element, so when i unstuck the fixed element, it would continue to scroll normal without any jump.
The problem with this solution is that i defined a fixed height for the placeholder, and this way it will only work correctly at a certain viewport height. Makes things more complicated, that every element on the site has a fluid height, so i need a solution that will work in every resolution.
Any ideas?
I solved this by creating a 1000px tall container and when the bottom of the container is hitting the bottom of the viewport, i change the fixed element to absolute.
<div class="header">Header</div>
<div id="height-placeholder" data-0="#class:;" data-bottom="#class:unstuck;">
<div id="fixed-element" data-0="#class:;" data-bottom="#class:stuck;">Fixed at the bottom for a while</div>
</div>
<div class="content">
Regular content...<br>
</div>
Here is the demo, works fine with any height:
http://jsfiddle.net/bkccg8x5/3/
I am attempting to put a weekly agenda in a row of thumbnails using Fullcalendar, but the resizing doesn't seem consistent.
1) On my work monitor, the agenda table renders correctly at full screen width, then changes to being taller than the neighboring thumbnails when the screen is narrowed, and then returns to correct rendering at full width. It also renders correctly when in mobile emulation and the row switches from horizontal to vertical configuration. The screen resolution is 1920x1080.
2) At home, the agenda renders initially as taller than the neighboring thumbnails at full width, then remains taller as the horizontal dimension decreases, renders correctly in mobile emulation, then renders correctly when the screen is restored to full-width. Screen resolution is 1366x768.
The base dimensions of the neighboring images are 465x300.
Relevant code bits. The jQuery calling the calendar (in the $(document).ready() section).
$('#calendar-index').fullCalendar({
defaultView: 'basicWeek',
height: $("#imgSource").height(),
width: $("#imgSource").width(),
windowResize: function(view) {
this.height() = $("#imgSource").height();
this.width() = $('#imgSource').width();
}
});
The HTML section:
<div class="row">
<div class="col-md-4">
<div class="thumbnail text-center"><div id="calendar-index"></div>Button Text</div>
</div>
<div class="col-md-4">
<div class="thumbnail text-center"><img id="imgSource" src="image1.png">Button Text</div>
</div>
<div class="col-md-4">
<div class="thumbnail text-center"><img src="image2.png">Button Text</div>
</div>
I've got a feeling that connecting it to a $("#imgSource").load() rather than $(document).ready() call would work, but I'm avoiding using deprecated functions if possible.
http://jsfiddle.net/sidhenimh/63e0h54o/
I found a fix for this, in case anyone else runs into a similar issue; it doesn't work perfectly, but it does at least make the horizontal scaling a lot more stable. There's a free jQuery plugin called "Datatables" that enables automatic horizontal scaling. Vertical scaling doesn't work still, but the table at least displays correctly initially regardless of monitor resolution/size.
Datatables Plugin
I have a DOJO Editor that is movable
<div id="dnd" dojoType="dojo.dnd.Moveable">
<div data-dojo-type="dijit/Editor" height="120px" width="250px"
id="editor3"
data-dojo-props="plugins:['bold','italic']">
<p>This instance is created with customized toolbar/ plugins</p>
</div>
</div>
I would like to know :
1- why changing the width attribute does not make any difference in the Editor's width
2- why the Editor resizes itself only when dragged for the first time(to the appropiate height)
I use DOJO 1.9.1
Use the style attribute on the div and not height and width and dojo will honor that.
<div id="editor3"
data-dojo-type="dijit/Editor" style="width:250px;"
data-dojo-props="plugins:['bold','italic'], height: '120px'">
<p>This instance is created with customized toolbar/ plugins</p>
</div>
The height will be auto-determined (be as small as possible and expand as required), but there is a minHeight property and a height property (shown above) you can assign in your data-dojo-props if you require height control
How can I scale an inline PDF when it loads, rather than forcing the user to click one of the two scaling options at the bottom of the PDF?
The width of the parent div the object is in is 680px wide, so when the PDF loads it has horizontal scrolling that I would like to do away with.
<div class="content">
<object data="pdf_link.pdf" type="application/pdf" width="680" height="870">
<p> It looks like you can't view this PDF, but you can download it here.
</object>
</div>
Note: width="100%" doesn't do the trick