0

I'm trying to build a UI that looks like a table but uses a DIV baseing it's internal DIV's off a static textarea.
I want the DIV's to position horizontally and wrap vertically...
here's the code I'm dealing with so far:

<div style="background-color:silver; width:450px; height:200px; overflow:auto; padding:10px">

    <div style="background-color:gray; width:100px; height:50px;">

    </div>

    <div style="background-color:gray; width:100px; height:50px;">

    </div>

    <div style="background-color:gray; width:100px; height:50px;">

    </div>

    <div style="background-color:gray; width:100px; height:50px;">

    </div>

    <div style="background-color:gray; width:100px; height:50px;">

    </div>

    <div style="background-color:gray; width:100px; height:50px;">

    </div>

</div>

^the internal DIVs are added dynamically.
also need a 10px spacing between them

what do I have to do to get this working??

Edited by Tcll

Votes + Comments
bad question...
2
Contributors
2
Replies
12
Views
3 Years
Discussion Span
Last Post by Tcll
0

Hi

you have use Float as left and margin as 10 px.

Example

<div style="background-color:gray; width:100px; height:50px;float:left; margin:10px;">
0

thanks, that did it :)

... >.>
I see we both got -1 on this page...
WTF people

Edited by Tcll

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.