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??

asdfghjklasdfgh commented: bad question... +0

Recommended Answers

All 2 Replies

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;">

thanks, that did it :)

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.