cenetering whole page

This is a discussion on "cenetering whole page" within the Web Page Design section. This forum, and the thread "cenetering whole page are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old May 18th, 2006, 19:13
SuperMember

SuperMember
Join Date: Nov 2005
Location: England
Age: 27
Posts: 309
Thanks: 1
Thanked 0 Times in 0 Posts
cenetering whole page

I'm trying to center the entire div vertically so that everything's always in the middle of the browser window. I've done:

vertical-align: middle;

but doesn't have desired effect.

How u do it please?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old May 18th, 2006, 19:50
Junior Member
Join Date: May 2006
Location: Manchester. UK
Age: 17
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Re: cenetering whole page

In your head tag:

HTML: Select all
<style type="text/css">
<!--
    .container{
        margin-left: auto;
        margin-right: auto;
        margin-top: 50%;
    }
--!>
</style>
Then you needto select the class in the top of your body and close it at the end.

HTML: Select all
<div class="container">
<!-- HTML here --!>
</div>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old May 18th, 2006, 19:52
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Re: cenetering whole page

I feel like I answer this question once a week:

http://www.webforumz.com/34611-post4.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old May 19th, 2006, 12:10
SuperMember

SuperMember
Join Date: Nov 2005
Location: England
Age: 27
Posts: 309
Thanks: 1
Thanked 0 Times in 0 Posts
Re: cenetering whole page

i'm sorry, but neither work
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old May 19th, 2006, 12:12
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Re: cenetering whole page

Quote:
Originally Posted by timmytots
i'm sorry, but neither work
Wrong, my method definitely works, I use it all the time and it tests well across multiple browsers and OSs.

You might have code conflicts or something. Post your code, or a link to the page in question.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old May 20th, 2006, 15:51
Highly Reputable Member
Join Date: Aug 2005
Location: 3rd Branch Up, Old Oak.
Age: 48
Posts: 658
Thanks: 0
Thanked 0 Times in 0 Posts
Re: cenetering whole page

Timmy, I used that code and it does work.
I had to show it very slightly differently than it's described but, if you see my post beneath Herk's in the thread, I show exactly what I used.
http://www.webforumz.com/css-forum/6...vertically.htm

Incidentally, I think if you want to show something in the middle, you should say "center" (US spelling) not 'middle'.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
cenetering, whole, page

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to prevent access to page B except via page A? Donny Bahama PHP Forum 1 Apr 3rd, 2008 02:15
Green bar of colour at bottom of page gets bigger the more page is extended pixelgirl Web Page Design 1 Apr 1st, 2008 01:27
internal navigation, Linking from one page to a specific div in another page. Oak Web Page Design 5 Feb 8th, 2008 22:54
Linking an outside page back to previous framed page MJustison Starting Out 1 Oct 18th, 2007 17:49
A gap appears beween the Page Title and the Body Content of the page. sovereign6 Web Page Design 6 Dec 18th, 2006 19:14


All times are GMT. The time now is 20:25.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved