/    Sign up×
Community /Pin to ProfileBookmark

Div Auto Position

Hello,

{This is my first post}

I have a website I’m designing and I need to auto-make divs, Below is a better description of the website and why this would be helpful.

Website Content:
Based On Hobby: Miniature Painting (Little thumb size action-figures)
It allows users to upload an image and add a short description, the website stamps the time, date, and description into a MySQL Database. When this is displayed, it shows the image, then directly below the time and date of upload with the short description beneath. For those who don’t know much about miniature painting, you can have thousands of these little guys, but i have decided a cap of 300 – 400 miniatures. I would like 4 miniatures per row, and to auto-position a new div on the desired page when a user uploads a new miniature based on where the last one was positioned. For example, if i have 5 miniatures already submitted, with 4 per row, the next one would be on row 2 at spot 2.

Is there anyway i can achieve this?
Thank You for any support.

~Turt2

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@nataliemacDec 23.2009 — Yes, this should be relatively straightfoward:

HTML:
[code=html]<div id="figure1"><img...><p>Info here</p></div>
<div id="figure2"><img...><p>Info here</p></div>
<div id="figure3"><img...><p>Info here</p></div>
<div id="figure4"><img...><p>Info here</p></div>
<div id="figure5"><img...><p>Info here</p></div>[/code]


CSS:
[code=html]div { width:25&#37;; float: left; }[/code]

You'll have to play with the CSS to get it to lay out exactly the way you want.
×

Success!

Help @turt2 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...