Help - Search - Members - Calendar
Full Version: Positioning and Page layout
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
newatthis
I am "new-at-this" I have spent all day trying to figure this out. I know it is simple but I can't figure out what I am doing wrong. Sure would appreciate a little help for the learned biggrin.gif

What I am trying to do is layout a page/template that will flow as follows:
1) 4 boxes - one for each corner (topleft - topright - bottomleft - bottomright)
These boxes are position-absolute and float - flushed - to their respect corners, relative to the size of the browser window

2) Then I want a paragraph block or image area that will center (vertically) relative to the size of the browser window, with about 10% margin on both sides.

I can not figure out how to code to get the paragraph/image area to center - vertically - within the page relative to is content size and the browser window, and of course balanced white space top/bottom below the top boxes and above the bottom boxes.

I've attached the html file - view source - to show you what I am trying for. wub.gif
Click to view attachment
Anonymous
Solution for most browsers (excluding, as always, IE):

CODE

html, body { margin: 0; padding: 0; height: 100%; width: 100%; }

/* --------------------------- CSS Class Tags ------------------------------- */

.box {border: 5px solid black;
        background-color: #99FFCC;
        font-size: x-large;
        font-style: oblique;
        margin: 0px;
        padding: 10px;}

.centermain {height: 100%; margin: 0 10%; display: table;}
.centermain p { display: table-cell; vertical-align: middle; }


In order for this to work in IE as well, you'll need a bit of extra HTML and a few more lines of CSS (hacks, mostly).

See here: http://www.jakpsatweb.cz/css/css-vertical-...r-solution.html

Good luck.
newatthis
Hope I am reply in the right spot -- I am panel warn out these days ohmy.gif

Thank you for the response and code advice - greatly appreciated.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.