Forums / General Questions / Is it possible to disable the horizontal scroll bar via the style sheet?

Is it possible to disable the horizontal scroll bar via the style sheet?

Locked

Started by gaffettape on 18 Jun 2009, 2:12 PM · Views: 1,532

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
18 Jun 2009, 2:12 PM
#1
gaffettape avatar

gaffettape

Zen Follower

Join Date:
May 2009
Posts:
433
Plugin Contributions:
0

Is it possible to disable the horizontal scroll bar via the style sheet?

Hello,

I would like to know if its it possible to disable the horizontal scroll bar via the style sheet?...

If so how?

If not, how do I??
My site is set at a fluid width of 100%

Thankyou :smile:

18 Jun 2009, 2:33 PM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Is it possible to disable the horizontal scroll bar via the style sheet?

yes, it is the overflow property.

http://www.w3schools.com/Css/pr_pos_overflow.asp

overflow:visible;
overflow:hidden;
overflow:scroll;
overflow:auto;
overflow:inherit;

are your options. Overflow:hidden means that the content that is outside the containing element is just not shown. They can be applied to any tag including the body tag.

However if you have a genuinely fluid layout, then why are you seeing a scroll bar at all? There must be some element in there that isn't fluid which is causing the horizontal scroll bar to appear. Which is probably an image.

A url for the page would help!

Nik

Nick
iszent.com

18 Jun 2009, 2:41 PM
#3
gaffettape avatar

gaffettape

Zen Follower

Join Date:
May 2009
Posts:
433
Plugin Contributions:
0

Re: Is it possible to disable the horizontal scroll bar via the style sheet?

Hi niccol,

Thanks for the quick reply. Im afraid the site isnt live yet so I cant provide you with a URL, sorry.

So would I literally just add 'overflow:hidden;' to the styleeheet then?

Thankyou :smile:

18 Jun 2009, 3:53 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,688
Plugin Contributions:
0

Re: Is it possible to disable the horizontal scroll bar via the style sheet?

You are getting a scroll bar because you have some padding or margins somewhere that is trying to make the page bigger than 100% - you should fix that rather than hiding the scroll bar, if you can. ( You can cheat by using 99.9% instead of 100% too)

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

18 Jun 2009, 5:10 PM
#5
gaffettape avatar

gaffettape

Zen Follower

Join Date:
May 2009
Posts:
433
Plugin Contributions:
0

Re: Is it possible to disable the horizontal scroll bar via the style sheet?

Hi Kim...

Yes I cheated!!, the 99.9% trick works fine for now, I intend on finding the culprit for the rogue scrollbar soon though!.

Thanks for your help :smile: