This is a discussion on "Vertical centering - please help!" within the Web Page Design section. This forum, and the thread "Vertical centering - please help! are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Vertical centering - please help!
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Hi there
I really hope someone can help with this as I'm beginning to despair. I'm somewhat of a CSS (and HTML for that matter) novice, and have been trying to understand enough to build my site. I've got most things sorted and looking reasonable, but can't get my page content (not the header image or menu though) to vertically center. You can see what I mean here: www.conkerphotography.co.uk/about.htm It looks okay on a 1024 wide or smaller monitor, but looks very unbalanced on larger ones. I've tried all sorts of ideas from various sites but think my lack of understanding of the basics is holding me back. I've pasted the page code for the above link below, and also the code from my 'maincss.css' style sheet which informs most of the layout. Can someone please advise what i need to add and where? Any support would be greatly appreciated. Many thanks, mpnuttall Page code
Last edited by saltedm8; Apr 16th, 2008 at 10:54. Reason: added [code] tags |
|
|
|
|||
|
Re: Vertical centering - please help!
Forgot to say, the height of each pages content (i.e. the bit in the div="main" section) varies, so I can't use fixed widths and heights for these elements and need the positioning to adjust in the same way the width does when the browser window is resized.
|
|
|||
|
Re: Vertical centering - please help!
Hi
I have treied on various resolutions and cant see your problem. The page you mention has this.
HTH Pat |
|
|||
|
Re: Vertical centering - please help!
Thanks for the reply Pat. I tried your code, though it hasn't changed anything. Maybe I wasn't clear about what i'm looking to achieve - I don't have a 'problem' as such (in so far as the layout I have works) but wanted to change it from this:
![]() to this: ![]() I.E. the content 'floats' in the centre of the screen regardless of window size/resolution. Is this possible? Thanks again, mpnutall |
|
||||
|
Re: Vertical centering - please help!
this might help you http://www.wpdfd.com/editorial/thebox/deadcentre4.html
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
|
|
|||
|
Re: Vertical centering - please help!
In your #main. give your margin-top something like 150px. That should remain constant.
|
|
|||
|
Re: Vertical centering - please help!
Thanks both.
Pat - I don't actually want it to remain a constant distance from the top, I want it to stay centred as the page is resized. saltedm8 - I'll give this a try. It looks like it might achieve what i want, but as I said I'm a novice and think I might struggle to integrate it in to my existing code :oS Thanks again, mpnuttall |
![]() |
| Tags |
| align, center, vertical |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CSS Vertical Menu. Can someone help? | CoolNeb | Web Page Design | 3 | Jul 16th, 2007 18:00 |
| Div Vertical Align | jwalker80 | Web Page Design | 5 | Jan 30th, 2007 23:34 |
| vertical centering woes | gwx03 | Web Page Design | 6 | Jun 5th, 2004 21:43 |
| Tip : Vertical and Horizontal Centering - Solved! | gwx03 | Web Page Design | 0 | Dec 15th, 2003 06:11 |
| Vertical Centering in CSS | gwx03 | Web Page Design | 1 | Dec 5th, 2003 15:36 |