/    Sign up×
Community /Pin to ProfileBookmark

scrollbar pushes centerpoint

so, I have a site, with a design so that there is a 800px block in the middle, with auto margin on each side of the block. Fairly standard.

However, a problem is that when this block becomes too long and produces a vertical scrollbar, this scrollbar makes my center block get pushed slightly to the left. If you nagivate quickly in between pages which does and does not have the scrollbar, the center block jumps quite a bit.

How can I avoid this, while still retaining my center block setup?

Here, see it for yourself:
[URL=”http://drakim.net/”]http://drakim.net/[/URL]

Try clicking on any of the blog titles, and you’ll be taken to the same page, but without the scrollbar on the right. The page “jumps” a bit.

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@FangOct 02.2008 — html {
overflow-y:scroll;
}
Copy linkTweet thisAlerts:
@DrakimauthorOct 02.2008 — Thank you.

Does this work in most browsers? I've never actually used any CSS on the HTML tag before.
Copy linkTweet thisAlerts:
@FangOct 02.2008 — In all modern browsers
×

Success!

Help @Drakim spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...