How to make an element fixed on the viewport? - google-app-maker

In the demos, there aren't css rules making the elements stay at fixed relative to the viewport. I don't know how this it is being accomplished.

The trick of 'fixed' elements in App Maker samples/templates is in fixed(css position absolute) layout of the root panel. To achieve this effect you need just to:
Create a page and set its layout to fixed
Add elements you want to be fixed and set their position with property editor (top, left, etc..)
Then you can add nested content/container/wrapper panel with flow (vertical/horizontal) layout type and tell it to fit to content
Note: Of course, you can go and set CSS position: fixed !important for your element, but in this case your page will look scrumbled in editor...

Related

CSS - keep scroll position at end of content while expanding

If I have a dynamically expanding block of content and a user has scrolled all the way to the end, is there a pure CSS solution to keep the user at the end when the content expands, appearing to push the content element's siblings upward?
I tried setting position: sticky, bottom: 0 on the element, but then it is taken out of the document flow and its siblings are overlapping.
It is not possible to change the position of the viewport with pure CSS, which is what you need to do to achieve the effect you're describing. You'll need to use javascript.

Positioning the scrollbar

As you know, the horisontal scrolling is required it is placed on the bottom of element that is not easy to find when the bottom or element is outside of the view port. Is there any css solution (even with partial support) to change the place of vertical scrollbar?
(there is a jquery plugin for that available that create a mock element on top of overflowed element and keep its scrolling position with the scrollbar of the targeted element, it's not what I am looking for, as the created element make trouble sometimes for styling).

How to super impose two elements and still have responsive behavior with zurb foundation

I need to put a <canvas> element on the top of a <video> element in order to draw something on my video. I can do this by setting the position of theses two elements to "absolute" but I lose the responsive behavior. With foundation is it possible to make these two elements seen as one and move the same way when the DOM layout changes, for example when resizing the window ?
Normally the parent element of the and the needs to have position: relative in order for their absolute positioning to be calculated relative to their parent rather than relative to the page.

create special floating menu in ASP.NET

I'm going to create an special floating menu like this site:
http://www.just-eat.co.uk/restaurants-toscana/menu
as you can see, Categories and Your Order menus float in screen so that their position is almost always the same, and they always stick to top of screen (of course after you scroll the page down), how can I create this effect in ASP.NET? I've set my menu style position property as fixed, but in this way, my menu always has the same position, I want my menus to stick to top of screen
Not sure if ASP.NET has such feature by default. Never seen something like that in it. But it could be done easily with CSS position:fixed placed on top most div of your menu block or using plugin like this, for instance. Please note that position:fixed may cause problems in old browsers
Hello Ali you must add stylesheet in order to float your menu, but you don't have property in order to float your menu basicaly
You can keep the position of the div to position:fixed.
By doing that its position will be relative to the position to browser window and it will appear to be fixed.
Here is Sample Fiddle
More on CSS Fixed Positioning.

How can I cause multiple absolute positioned divs to be treated as backgrounds?

I have a main container div, where all the important content of the site is inserted, 800px wide, centered horizontally.
I need to put multiple absolute positioned divs layered below it (via z-index) and outside its width, without causing extra scrollbars to appear, and without losing the main container scrollbars (so puting overflow:hidden in a wraper won't do).
In other words, I was wondering if it's possible to create divs with different elements inside (videos, images, or text) that could be treated as backgrounds, so that the scrollbars would only appear when the window resizes below the 800px wide (width of the main container), and the rest of the divs would just bleed out (something similar to what swffit causes with an embebed flash movie).
Is there any way to do this via css or javascript?
Thanks in advance!
There is a way that requires CSS only. I once faced similar problem with this web site I created, take a look at the source. The curves by the side are done this way.
Trick is to change positioning of main container to relative with no shift - that causes change of coordinates base, here is a link. Than use absolute positioning of the "background divs" to get them outside the main box.
To solve the overflow problem use some extra div wrapper (in my site with id graphic). To specify its width use a range - min-width equal to main box and max-width as total width including the "backgound divs". And to this wrapper set the hidden overflow.
Hope it helps.

Resources