PDA

View Full Version : centering content on any screen size


b3w
09-28-2011, 10:32 AM
hello !

i'm trying to center an image with a width of 980 px so that it will always be centered, even on a 1920x1200 screen

i followed this tutorial by Mike Crone (http://www.dreamweaverclub.com/css-center-content.php) and the left and right centering works fine - but the image is always locked to the top of the screen, not with equal amounts of white space between the top and the bottom (what i would like!)

if anyone could advise me i'll be very appreciative, thanks in advance

domedia
09-28-2011, 12:44 PM
What image?
Link please.

johnMoss
09-29-2011, 01:10 AM
Jim,
Image set to position fixed with a ___% margin-top?

gentleone
09-29-2011, 07:51 AM
Here is an old thread where I gave an example for centering an element horizontally and vertically.
http://www.dreamweaverclub.com/forum/showthread.php?t=34354

b3w
09-29-2011, 09:36 AM
hi guys, thanks for the tips ... here is the link http://tinyurl.com/43fc3nb
i think have managed to do it but i don't really understand how

b3w
09-29-2011, 09:39 AM
PS. i was testing it on ViewLikeUs