/    Sign up×
Community /Pin to ProfileBookmark

…that doesn’t want to be centered on the page. I can center it horizontally, but I cant figure out how to do so vertically.

Thanks!

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@pawan143_5Sep 18.2010 — There is no way you can center align a div vertically by using css the only way you can center align a div by giving margin from top like

margin-top:10px;[/QUOTE]
Copy linkTweet thisAlerts:
@Ramil_AlcibarSep 18.2010 — There are already many tutorials on how to center an element (inline/block) horizontally and vertically. Since you're dealing with DIV which is block, it will be easy.

Here are some guides for you:

http://blog.themeforest.net/tutorials/vertical-centering-with-css/

http://www.noobcube.com/tutorials/html-css/horizontal-and-vertical-centering-using-css-a-beginners-guide-/
×

Success!

Help @Not_to_mention 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.18,
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,
)...