Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3979644
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:11:43+00:00 2026-05-20T05:11:43+00:00

have a box that displays images wrapped in a div from a database 4

  • 0

have a box that displays images wrapped in a div from a database 4 across x 4 high. The image are floating to the left so they self wrap. But I want to add an object (a div) to the top right and have the images wrap around (so only 3 in the first row, then 4 every row after). I’ve tried using float right, absolute, relative and nothing gets it to display correctly.

Any tips?

EDIT (CODE):

I add the div first then the images, what happens is that the div pushes the image that would otherwise be in the 4th spot down out of the way, doesn’t wrap it.

This is my goal:

| Image(in div)  Image(in div)   Image(in div)    Div   |
| Image(in div)  Image(in div)   Image(in div)    Image(in div) |
| Image(in div)  Image(in div)   Image(in div)    Image(in div) |
| Image(in div)  Image(in div)   Image(in div)    Image(in div) |

Images:

position:relative;
float:left;
height:200px;
width:200px;

Div:

position:relative;
float:right;
height:200px;
width:200px;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:11:43+00:00Added an answer on May 20, 2026 at 5:11 am

    You can simply place the div in front of all the images, then float it to the right:

    #right {
        width: 200px;
        float: right;
    }
    

    with this HTML:

    <div id="right">
        Some text, content. </div>
    
    <img src="http://placehold.it/200x200" alt="" />
    <img src="http://placehold.it/200x200" alt="" />
    [...]
    

    Usually there isn’t a need to float the img elements here, since they are inline elements already. See this working live here: http://jsfiddle.net/wQfAc/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an expander with a list box in it that displays image thumbnails.
I am fetching data from the following database: I have arduino-box that send that
All, BACKGROUND: I have a collection_select statement that displays a dropdown box. OBJECTIVE: I'd
I have a banner (XML_Banner.swf) that is supposed to load and rotate images from
I have a v simple dialog box that I would like to display as
I have a dialog box that allows users to set hotkeys for use in
I have a search box that doesn't have a submit button, I need to
I want to have a text box that the user can type in that
I have a directory on a linux box that I want to make publicly
I have a partial that renders a select box using the following method: <%=

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.