
Originally Posted by
Phoenix409
how can i recreate this without using the table?
and i've tried the float. it doesn't work...
it does, but this might be more what you're looking for:
HTML Code:
<div style="width: 180px; display: inline-block;">
<div style="text-align: center;">
<img src="about_us_html/thumb/IMG_0736t.jpg" alt="" width="86" height="130" />
<br />
<a href="javascript:animatedcollapse.toggle('michael')">Michael Shklyar</a>
</div>
<div id="michael" style="width: 180px; display:none; text-align: left; margin: 0;">
<p>B.Sc student in physics at the Technion - Israel institute of technology</p>
<p>Control and data processing software development of ESR microscopy.<br /></p>
<p style="text-align: right;">
<a href="mailto:smishash@t2.technion.ac.il">
<img src="mail.png" border="0" alt="mail me"/>
</a>
<a href="javascript:animatedcollapse.hide('michael')">
<img src="arrow_up.png" border="0" alt="close"/>
</a>
</p>
</div>
</div>
The outer div with display: inline-block; is the big thing. There are some other changes, too, that help smooth out the layout (e.g., align="" is depreciated; you shouldn't use it). There may also be margin and/or padding problems when you have an inner div with the same static width as its parent.
This defines the content blocks (what you're using table cells for) and lets them line up as they fit. If the screen (or container) is wide enough, they'll line up in a single line, otherwise, they'll make multiple rows. There is a little bit of work to make sure this is cross-browser compatible, though.
Bookmarks