Old 27-03-2006, 08:52   #1 (permalink)
captainK
Registered User
 
captainK's Avatar
 
Join Date: Dec 2005
Location: Leeds
Posts: 56
Page jumps

Has anybody encountered a problem with CSS styled pages which uses the margin:auto command to centre the page and the entire contents jump a few pixels to the left when the content of the page extends longer than the length of the browser window?
  Reply With Quote
Old 27-03-2006, 08:58   #2 (permalink)
cam
vague™
 
cam's Avatar
 
Join Date: Mar 2004
Location: Glasgow
Posts: 5,555
Quote:
Originally Posted by captainK
Has anybody encountered a problem with CSS styled pages which uses the margin:auto command to centre the page and the entire contents jump a few pixels to the left when the content of the page extends longer than the length of the browser window?

It's when the browser adds the scrollbar.

Add html { height: 100%; } (i think it is) to always have the scrollbar and you avoid the jump
  Reply With Quote
Old 27-03-2006, 09:07   #3 (permalink)
captainK
Registered User
 
captainK's Avatar
 
Join Date: Dec 2005
Location: Leeds
Posts: 56
Quote:
Originally Posted by cam
It's when the browser adds the scrollbar.

Add html { height: 100%; } (i think it is) to always have the scrollbar and you avoid the jump

Excellent! Cheers for the quick response
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8