Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: Centering a div ?
08-04-2012, 01:52 PM #1
- Join Date
- Mar 2011
- Thanked 0 Times in 0 Posts
Centering a div ?
Can anyone assist me in centering a div both vertically as well as horizontally.
I have created a div and assigned the following css rules to it.
It is perfectly centered on my page, however as soon as you use the zoom feature in the computer (ctrl "-" "+") the box still remains centered but starts to get dragged to the top of the screen.
I have tried many different combinations.
I would like to have this div centered no matter what the user does with either screen resolution or zoom function.
Is it even possible?
08-04-2012, 02:23 PM #2
- Join Date
- Apr 2011
- London, England
- Thanked 354 Times in 353 Posts
08-05-2012, 06:04 PM #3
- Join Date
- Aug 2005
- Thanked 79 Times in 77 Posts
Getting content to stay or act the way you want it to when resizing the browser's viewport makes for lots of problems. Even flexible pages have problems with this as it is not so much the resolution, but the browser's viewport size at any resolution.
Choosing Dimensions for Your Web Page Layout:
In Search of the Holy Grail: http://www.alistapart.com/articles/holygrail/
Choosing Dimensions for Your Web Page Layout: http://www.elated.com/articles/choos...b-page-layout/
How to create flexible sites quickly using standards like CSS and XHTML: http://www.ibm.com/developerworks/web/library/wa-rapid/
Care With Font Size: http://www.w3.org/QA/Tips/font-size
Designing for the Web: Resolution and Size: http://sitepointcom.createsend4.com/...yd/birtthtw/h/
Websites Shouldn’t Look The Same Across Different Browsers: http://www.noupe.com/design/websites...re-is-why.html
Cross-Browser CSS in Seconds with Prefixr: http://net.tutsplus.com/articles/new...-with-prefixr/
Responsive Web Design Demystified: http://www.elated.com/articles/respo...n-demystified/
Responsive Web Design: 5 Handy Tips: http://www.elated.com/articles/respo...-5-handy-tips/
It’s Not Responsive Web Building, It’s Responsive Web Design: http://www.getfinch.com/finch/entry/...ve-web-design/
Beginner’s Guide to Responsive Web Design: http://thinkvitamin.com/design/begin...ve-web-design/
Might look at the coding for centered content and modify as needed:
No Image: http://nopeople.com/CSS%20tips/verti...CSS/page4.html
Last edited by Major Payne; 08-05-2012 at 06:07 PM.
☠ ☠RON☠ ☠