/    Sign up×
Community /Pin to ProfileBookmark

Div align = center annoyance

I have noticed many-a time when aligning a page to center, that once the page content leads to the page being able to scroll that the center is not the same location as pages do not, creating a slight jumping affect when going though the navigation.

is there an easy way to remedy this problem?

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@bigalcApr 15.2009 — If I understand you correctly, it's because the scroll bar appears on the right and reduces the window's available width slightly. Not sure how you'd get around it in any simple way though, unless you write a different css rule for pages without overflowing content...
Copy linkTweet thisAlerts:
@lystarApr 15.2009 — All you need to do is force the scroll bar to appear even when the content is too short to need it. It will appear greyed out.

To do this use the following:

[CODE]
html {
overflow-y: scroll;
}[/CODE]
Copy linkTweet thisAlerts:
@skilled1authorApr 15.2009 — If I understand you correctly, it's because the scroll bar appears on the right and reduces the window's available width slightly. Not sure how you'd get around it in any simple way though, unless you write a different css rule for pages without overflowing content...[/QUOTE]

that would be correct

All you need to do is force the scroll bar to appear even when the content is too short to need it. It will appear greyed out.

To do this use the following:

[CODE]
html {
overflow-y: scroll;
}[/CODE]
[/QUOTE]


sweet, just what i was looking for. many thanks
×

Success!

Help @skilled1 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 5.28,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...