absolutely positioned div's content not hiding when width of div is changed - width

I have a sidebar div which is positioned absolutely. When i click the hamburger icon in mobile view, I am changing the width of that div to 0. That works perfectly but the menu items inside it are still visible. shouldn't they be hidden because the container div's width is 0?

Related

on scroll overlap on top of div in html

How to implement design in html where there will be image div and content div on scroll the content div should overlap the image diventer image description here
On scroll the content div should be on the top of image div it should overlap with high z-index

Height of an accordion Panel based on the number of child

On lunch, my application is loading a data store and is creating some Ext.panel.Panel inside an accordion layout based on the number of items in the data store.
Is there a way to auto adjust the height of the accordion Panel ? The height should be determined by the number of Panel inside the accordion Panel.
I did it by setting the height manually.
I estimated that each accordion item is 37 pixel. And I am adding 100 to leave space for the text inside the accordion items.
myPanel.setHeight(records.length*37+100);

Force Extjs grid to recalculate width - after hiding a simple "div" next to it

I have a grid in ExtJS and a div that I place or toggle to the left of it. This div is not managed by ExtJS.
When I show this div, the grid slips to the right and this div shows up on its left.
The problem I have is that when I hide the div, the grid squeezes and looses the full width it had based on the "fit" layout meaning there is some empty space left on the right of it now.
Now, as soon as I resize the window, it catches the event and resizes itself but not before it.
Anyone with any suggestions I could try in order to maintain the grid's stretch, your help is much appreciated.
Try explicitly calling doLayout() on the grid or the grid's parent, when the div is hidden.

How to stop the horizontal scroll bar from showing when window is resized?

I have this website http://www.claybrookeanimalfeeds.co.uk/index.php which I want to be able to keep the content in the middle of the page. Now I've got it so that most of the content stays in the same place when the window re-sizes, however the problem is that when I re-size the window to half the size of the screen, a horizontal scroll bar appears but when you move the scroll bar to the right, there's nothing there and it's just a blank space.
Is there anyway that I can make so that the content stays in the same place without a scroll bar appearing when I re-size the window?
Instead of using percentages as your widths for the containers, use a pixel value.
Example: #content { width: 800px }

Navbar items change color depending on their current position

I would like to do the same thing with my navbar for my school website project - check this page out as reference - http://www.sketchin.ch/ when you scroll, the hole navbar changes its color.
is this canvas used? Please, I really, really need help with this! Any ideas will be greatly appreciated.
Basically, there are two different menus. The video header at the top is a higher z-index than the black menu. As you scroll down, this menu then comes into view.
Both menus are the same fixed position as each other. The white menu is inside of that first section, which has overflow set to hidden. This means that as you scroll down, the white menu is fixed and so goes out of the header section, so it becomes hidden, and the other menu appears from below the first section because it too is fixed position..

Resources