Force vertical scroll bar on vb.net form css 2

I been reading up last 2 hours for solution to this.  Any expert ideas?  basically I have a form that has centered content.  However browsers pop up scroll bar (vertical) when page is long.  This is fine and dandy, but with centered form, I get page shifting to left everytime scroll bar pops up.  I understand in css 3 there is sroll-y forced option.  I am using css 2, visual studio 2008.  I tried making div 101% height, hoping to cause permanent vertical scroll bars, did not do anything.  Any help is appreciated. Thanks in advance.
CPOINT2000Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
You may need to set it to 102% and make sure the container has a set height and overflow:auto is set

Another way set the container to overflow:auto and set the nested element to 100% height and margin-bottom:-1px
http://jsfiddle.net/GaryC123/3GqrC/2/
0
CPOINT2000Author Commented:
Actually I had tried with 110% and it did not work.  I ended up creating a DIV section at bottom with 400px height.  It's empty DIV.  As long as browser screens are 1200px or less height this covers me and that's my target audience.   However I am not sure if having this DIV with 400px fixed height would have any performance degradation issues...
0
Alexandre SimõesManager / Technology SpecialistCommented:
Doesn't just setting:
overflow-y: scroll;

Open in new window

work?
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

GaryCommented:
Then try my second suggestion.
Or just forget about anyone on <IE9 and use the overflow-y css - if I only had 5% of users who this would affect then I would say I am not hacking my code to make it look nice just for you - and this is only an aesthetic thing, it doesn't stop anything working.

@alex
That is CSS3
0
CPOINT2000Author Commented:
where do I place the overflow-y: scroll;? I read that in couple places to put it to html, but I am not sure where that goes.
0
GaryCommented:
Whereever the css class is in your styles page for the element
You can put inline in the element directly but it is not advised to have inline styles.
0
Alexandre SimõesManager / Technology SpecialistCommented:
Eh... sorry... I was a bit confused about this.
I have no native IE8, although on IE10 even setting it to IE7 / IE5 Quirks, overflow-y still works.

Good luck! :)
0
Alexandre SimõesManager / Technology SpecialistCommented:
If you want to try it just set it in-line on the div you want to show the scroll:
<div style="overflow-y: scroll">your content</div>

Open in new window

If it works then you might consider to set it in a css file...
0
CPOINT2000Author Commented:
My understanding is this is CSS 3, which is not compatible with visual studio 2008 (which is what I am using).  when I try the codes above it is not recognized because of CSS 2 it says.  I do not have a problem with scrolling the div itself.  I have 3 DIV's.  Should I have another and place the 3 DIVs in to one DIV?

I tried on HTML and BODY tags, and it is not recognized.
0
GaryCommented:
You can change the errors to warnings which will allow you to build the app ergo use CSS3
I'll have to look where it is hidden in options...
0
CPOINT2000Author Commented:
so, css3 will work on visual studio 2008 then?  and how do I change errors to warnings?  and doing that will only apply to css3 errors?  or all errors?  in which case I do not want to loose the error stopping capabilities for rest of errors though.
0
GaryCommented:
It would disable it for HTML and CSS - which I assume you wouldn't be bothered about the HTML if you are wanting to use CSS3

Off the top of my head
Tools/Options
Expand Text Editor
HTML/Validation


If not the path will be similar.
0
CPOINT2000Author Commented:
Thanks.  Let me give it a try.
0
CPOINT2000Author Commented:
Actually it's set for warning.  see attachment.  should I select different target?  also it does not allow me to change the check boxes (they are grayed out)
Capture.PNG
0
GaryCommented:
Disable the whole lot of them - they are all html errors.
0
GaryCommented:
Actually are you using XHTML 1.0?  Select the correct doctype that you are using on the site.
0
GaryCommented:
You do know that Expression supports HTML5 and CSS3 if you are not able to upgrade VS which I always thought was a bit of a behemoth for just web dev
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CPOINT2000Author Commented:
I actually used the following and seems to work at least on FireFox.

    <style type="text/css">
        html,body {
        height:100%;
        margin:0;
        padding:0;
        padding-bottom:1px;
    }
    </style>
0
CPOINT2000Author Commented:
I will look into expression.  Do not what it is yet :)
0
GaryCommented:
It's like a cut down version of VS that deals only with web based projects
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.