homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Gold Sponsor 2015!
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

vertical align of DIVs within an enclosing DIV

10+ Year Member

Msg#: 802 posted 9:59 pm on Mar 27, 2003 (gmt 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]



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

Msg#: 802 posted 10:04 pm on Mar 27, 2003 (gmt 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?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved