CSS: I don't have horizontal scroll but when I click and drag the page it goes left - css

I'm developing a website and on its home page I have some sliders.
When I use these sliders I used to get horizontal scroll. I managed to fix that using overflow-x:hidden; at the css for the body element.
My problem is that When I click and drag the page to the right the scrollbar doesn't appear, but the user have the same effect as if he was using the scrollbar.
I received the html/css from a third part front-end developer and I'd prefer not to have to modify his css much.
Would you have any tips to fix this behavior without having to do further changes in the html/css structure?
Thanks in advance for any help.

Related

Allow site contents to scroll below a fixed positioned element

I am trying to implement an off canvas menu in my Wordpress site. Instructions on coding the menu are taken from this site:
http://tympanus.net/Development/OffCanvasMenuEffects/sideslide.html
The problem is that when you open the menu and the mouse is on the menu I cannot scroll the site contents beneath the menu. This is specially important in the mobile version since the menu takes much of the space on the screen so being able to scroll the site contents is very important.
So basically I want the menu to not be scrollable, but the site contents should always be scrollable whether the menu is visible or not.
I fixed it using the javascript fixes mentioned here:
A way to scroll an underlying div when mouse is on top of a fixed div?
#howard-e Thanks for taking the time to look at this.

Set the Popup box to a fixed position

I'm fairly new to HTML and CSS work but have been very proud of how far I've come with the help of forums like this one. So first and foremost, thank you!
My question: I am using a Colorbox on my website that displays a popup on top of the current page. The problem is, if I scroll with the mouse wheel and the pointer is resting in the grayed out area (the original page I opened the colorbox from), the original page scrolls down...thus eventually moving the colorbox off the screen.
What I want is for the colorbox to always be visible in the middle of the screen, regardless of how a user scrolls. The only way to get rid of it would be to close it.
I've read a lot about using the position:fixed attribute, and have attempted to do that but had no success (tried surrounding the colorbox with a simple div with a "position: fixed" setting). Plus in looking through various comments is seems like the fixed position is something that should be used sparingly, if at all.
Does anyone have a suggestion on a div I can create to keep the colorbox positioned on the screen at all times? Or maybe an alternative idea, like preventing the ability for a user to scroll down the grayed out area of the original page?
Here's a link to the page that displays the issue. If you click on one of the dozens of sample story links, you'll see the colorbox appear. When it does, start scrolling down the original page and you'll see the box eventually goes off the screen.
Any advice would be greatly appreciated everyone. Thank you!
The problem is that the Colorbox Javascript appends inline style to the box which will override external or internal CSS. Give your property values !important to prioritize.
#colorbox {
outline: 0 none;
position: fixed !important;
top: 10% !important;
}

mobile navigation doesn't fix on scrolling

I'm working for a responsive website on a slider like FB App. It works fine, but if the user scrolls, the open navigation moves with the content. I'm trying to put position: fixed to the element. This works,but if the navigation element is larger than the screen the rest of the content cannot reached. Example: http://lucie-hauri.com.beethoven.ch-meta.net/ (just put the screen to a width of about 300px an the mobile Icon appears, click on it for example).
Has anyone an idea how to fix this?
Thanks for help, regards
Thomas
I don't know if this is the cause, but you have a javascript error (check the console), which may break things up.

Prevent scroll bar appearing

I am developing a website in asp.net; and on this page is the collapsable panel control installed from ajax. My question is, when i open the panel (in which there is a few labels) the scroll bar appears on the side of the page, and the page shifts. This looks unclean. I was wondering if there is a way to prevent the scrollbar from appearing.
Thanks in advance!
If you are talking about disabling the browser scroll bar you can add overflow-y: hidden to your html element in css.
Caution - this will disable scrolling on the website.
If you want to prevent from appearing and disappearing a scrollbar you can just enable it to be always there.
html {overflow-y:scroll}
It should help with the effect of moving site to the left or right depending on scrollbar appearance. Hope it helps.

CSS issue with drupal theme

I have created a drupal theme, URL: http://sundancefoundation.org/
There is a small shift in the layout when we switch between home page and about us page.
This is working fine in firefox only, all other browsers are showing this shift.
I know this is a CSS issue, but not able to fix it.
Any help is appreciated.
Thanks.
The About us page is shorter than the screen height and therefor has no need for the scroll bar on the right hand side of the screen. The home page is longer and has a scroll bar. When the scroll bar appears or disappears it looks like the screen is shifting but that's all it is.
This css rule will simple fix the body width flickering issue:
body {
overflow-y: scroll;
}

Resources