CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 24th, 2012, 06:55 AM
tou1 tou1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 3 tou1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 30 sec
Reputation Power: 0
Browser's vertical scrollbar shifts layout

Hi everyone!

I have a problem with the design I'm working on.

I used this css grid as a basis to make the design more flexible: http://cssgrid.net/.

Most of the content of the website is not longer than a few lines but one of the pages contains a long text. The problem is that the browser automatically adds a scrollbar to the right which then moves the whole design to the left by a few mm. When you click the menu to go to another page, this shift looks quite stupid.

So far I thought of adding
Code:
style="overflow: scroll; height:350px;"
to the box that contains the layout. That of course removes the browser scrollbars but sort of defeats the point of the flexible layout as the height is now defined to fit my screen.

Another idea was to add
Code:
html {height: 100.1%; }


but that doesn't look good either.

What else can I do to prevent the shift? Thanks!

Reply With Quote
  #2  
Old December 24th, 2012, 12:00 PM
aeternus's Avatar
aeternus aeternus is offline
For POny!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: Amsterdam
Posts: 416 aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 4 h 56 m 43 sec
Reputation Power: 114
I use

Code:
body{overflow-y:scroll;}

This adds a permanent scrollbar. (and thus no shift)
Any other solution that tries to compensate with margins and stuff will not work due to the differences between operating systems (all have different scrollers). Unless you make your own scroll stuff with javascript
__________________
PHP Tutorial

Reply With Quote
  #3  
Old December 25th, 2012, 04:54 AM
tou1 tou1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 3 tou1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 30 sec
Reputation Power: 0
thanks a lot! works!

Reply With Quote
  #4  
Old December 25th, 2012, 06:20 AM
aeternus's Avatar
aeternus aeternus is offline
For POny!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: Amsterdam
Posts: 416 aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 4 h 56 m 43 sec
Reputation Power: 114
Quote:
Originally Posted by tou1
thanks a lot! works!

good to hear!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Browser's vertical scrollbar shifts layout

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap