Results 1 to 2 of 2

Thread: Div Auto Position

  1. #1
    Join Date
    Dec 2009

    Post Div Auto Position


    {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.


  2. #2
    Join Date
    Mar 2006
    Yes, this should be relatively straightfoward:

    HTML Code:
    <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>
    HTML Code:
    div { width:25&#37;; float: left; }
    You'll have to play with the CSS to get it to lay out exactly the way you want.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center