Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page position with/without vertical scroll bar.

Status
Not open for further replies.

aich69

Technical User
Apr 23, 2004
588
GB
I have a feeling I'm asking a really basic question here but the answer is illuding me so here goes...

I am building a site HTML/CSS, centered pages, one style sheet caters for whole site. Here's the obvious bit: pages that don't scroll sit the width of the scroll bar to the right of those that do.
Before I used CSS I would have added some space to the right side of a page that didn't scroll to get it to line up with those that did, possibly not the most elegant way but that's what I did.

I'm sure there must be a more elegant/CSS way to get all pages to line up on each other regardless of whether they scroll or not.

Could anyone point in me the right direction please?



I used to have a handle on life... but it broke. Cpt. Red Bull
 
set your fixed width container to allow for the scrollbar. (~ -30 to -40px)

ie:For 1024px wide your container should be 980 - 990px wide.




Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Sorry Chris, I never thanked you for your reply.

I opted to force a scroll bar on all pages, where the page is short the scroll bar movement is limited to just 1px.

I wasn't sure if I was going to like this at first but it's better than the page skip option.

Thank you... [smile]

I used to have a handle on life... but it broke. Cpt. Red Bull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top