Forum Moderators: not2easy

Message Too Old, No Replies

DIV alignment

Need help aligning elements inside DIV

         

jepler

6:01 pm on Dec 18, 2009 (gmt 0)

10+ Year Member



Hello,

I'm sure this is an easy fix, I just can't seem to arrive at it at the moment. I'd like to align all content below inside the DIV so that it will vertically align in the middle. Perhaps the form image element is the problem which is causing the images to not align in the middle of the DIV?

<div style="vertical-align: middle;text-align: center;">
<form action="get_pdf.php" method="post">
<strong><a href="link.html">Stage 1</a>:</strong> Completed
<img src="stage_one.png" width="32" height="32">
<input type="image" src="page.png" border="0">
<input type="hidden" name="stage" value="1"/>
</form>
</div>

Any help is greatly appreciated.

-Jim

limbo

8:58 pm on Dec 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Centering on along the horizontal axis is quite straight forward. One way is to define a width for your container and give it's margins the following property: margin:0 auto;

Vertical alignment is a different kettle of fish: [webmasterworld.com...] ;)