Remove horizondal scroll - css

Is there any way to remove the horizontal scroll ?
There is no content towards the right but the area remains blank and scrolling comes .
The styles for modal are :
.ticketModal {
width: 1000px;
min-width: 1000px !important;
overflow: hidden;
max-width: 1000px;
}

You should add in your css overflow-x: hidden; to your main div or class, this will help you to remove horizontal scroll

If you don't want the horizontal scroll in the entire app. Simply add
*{
overflow-x: hidden;
}
This will remove the horizontal scroll for all the DOM elements

Related

How To Create a Horizontal Scrolling Menu starting from the centre?

How to create a Horizontal Scrolling Menu starting from the centre as shown in the image below? I need to add scrolling to my page.
.vist {
text-align: center;
overflow: auto;
white-space: nowrap
}
If you make a width of 200% of the screen viewport, that should do it
.vist {
width: 200vw;
}

Flexbox overflow scroll in angular component

I am trying to build a two column design with an Angular 2 app. I created a plunker to reproduce my problem: https://plnkr.co/3Evxm9?p=info
I want the scrollable area to be the red div (.overflow), not the .page. Without the .page { overflow: auto } the page won't scroll at all, though I would expect .overflow to do so since it has a defined height of 100%. The padding is there to offset from the .top div. I initially though using margin instead, but without the overflow: auto on .page, the margin goes outsides the bounds of .container (which shrinks to fit the height (padding included, margin excluded) of .overflow.
I seem to misunderstand the behaviour of the flexbox.
I made some adjustment to your css to make the red area scrollable only.
css:
.page {
width: 100%; height: 100vh;
background: red;
flex: 1;
overflow: hidden;
}
.overflow {
font-size: 30px;
padding-top: 64px;
height: 93vh;
overflow: scroll;
}
Thanks for providing a plunker. It helped a lot to find a solution for you. Here's the link to the edited plunker.
Hope this helps!

Is it possible to use combined overflow CSS/JS?

I'm looking for a solution for combining different x and y overflow.
Following code:
div {
overflow-x: visible;
overflow-y: hidden;
}
doesn't work. I want a simple method to hide horizontal scrollbar, keeping the vertical overflown content visible. I do not want to change the DIV's height in layout. Any tricks?
I want a simple method to hide horizontal scrollbar, keeping the vertical overflown content visible.
for horizontal -> overflow-x
for vertical -> overflow-y
You could just use
div{
overflow-x: hidden;
overflow-y: auto; // if you don't want scrollbar use visible
}
Use the below.
div {
overflow-x: hidden;
overflow-y: scroll;
}
WORKING DEMO
The HTML Code:
<div>This is a div.</div>
The CSS Code:
div {
overflow-x: hidden;
overflow-y: scroll;
display:inline-block;
}
Hope this helps.

How to change the style of parent div of stage canvas?

kineticjs generates a div container to wrap a stage canvas. But it sets this div's display attribute as display:inline-block.
I would like the canvas is displayed in full screen without scroll bar in browser. But with display: inline-block, there are always scroll bar displayed.
If I can set display as auto, the scroll bar will disappear.
Is there any way to set the css style for the div generated by kineticjs?
Thanks in advance!
I had the same issue a few weeks ago. I also didn't want the scrollbars to be visible, because my canvas is always scaling to full-screen. I worked this out by setting the complete html/body to overflow:hidden;
Complete CSS of my html, body:
html, body{
position: relative;
width: 100%;
height: 100%;
margin: 0px;
overflow: hidden;
}
To set the div at full-screen you simply have to set its width and height to 100%:
#container{
width: 100%;
height: 100%;
}
And last but not least, set the width and height of your stage to:
width: window.innerWidth,
height: window.innerHeight
I hope this could somehow resolve your problem :)

Why am I getting a horizontal scrollbar on the page

I've tried so many things on this page
https://boycottplus.org/campaign/reclaim-our-time-say-no-time-wasting-websites
On the right column, I can't get a padding or margin of 10px between it and the left column without a scroll bar appearing. I've tried using a wrapper div but everything I do seems to bring the scroll bar :-/
The style I am focusing on
.subsection .inner {
padding-left: 10px;
}
in firefox
Add overflow:hidden to your body style.
Are you setting width and padding on the same element?
For example, if you have:
.subsection .inner {
width: 100%;
padding-left: 10px;
}
then the total width of the inner div will be 100% + 10px, which will result in a scroll bar.
If you want to remove scrollbar in horizontal direction, then use overflow-x: hidden; in that particular HTML element, keeping your vertical scrollbar intact.

Resources