Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

vertical align of DIVs within an enclosing DIV

9:59 pm on Mar 27, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 27, 2003
votes: 0

Please see <snip>

I have three DIV "columns" (dotted borders), within an enclosing DIV (solid border). I'd like to vertically align the dotted DIVs within this enclosing DIV. Is there any way to do it without using absolute positioning?

Also, as an aside, should I be using <br> to vertically "stack" my images, or is there a more CSS-kosher way?


[edited by: Nick_W at 10:05 pm (utc) on Mar. 27, 2003]
[edit reason] no urls please [/edit]

10:04 pm on Mar 27, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
votes: 0

Welcome [webmasterworld.com] to Webmaster World!

You can use display:block to force the images to stack. As far as vertical alignment... well, that's tricky since it has to be in reference to something else. Two divs on top of each other, each positioned using vertical-align... doesn't work. You can always play with margin/padding though. I'd recommend absolute/relative positioning though, since that's what you're doing anyway, right?