View Full Version : Vertical Alignment of a div on a page

05-13-2006, 10:10 PM
Hi All

I'm sorry if this has already been asked somewhere else on this forum, I searched but could not find anything.

Im am trying to get a div to verticly align on a page (dynamicly) so it centres verticly on a page, i have tried many ways in CSS to no avail does anyone have any suggestions?



05-13-2006, 11:16 PM
Not sure what you mean... but maybe like this:

<style type="text/css">
.centered{ margin:25% 0% 25% 0%;
border: 2px solid blue;

<div class="centered">
<p> All your base go here. <br/><br/><br/><br/></p>

more code would help...

05-13-2006, 11:48 PM
You a legend, that works!


05-13-2006, 11:59 PM
<hoping it still works when used in a page full of stuff...>

Glad to help.

playing with my copy, that min-height line isn't actually doing anything... but if you switch it to px instead of % it does... I thought min-height was supposed to work with both?

05-14-2006, 02:08 PM
It didnt when I tryed to plug it in to my current site design, I've scrapped the idea now

Thanks for your help anyways:thumbsup:

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum