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 5945399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:40:34+00:00 2026-05-22T16:40:34+00:00

In CSS 2.1, how can I put different divs next to each others? I

  • 0

In CSS 2.1, how can I put different divs next to each others? I found that there is a property float and values left, right, none and inherit and I guess they allow me to put for example picture A left and picture B right. But how can I put a picture B below picture A, or for example such that pictures are 15 pixels below the navigation bar of the site?

  • 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-22T16:40:35+00:00Added an answer on May 22, 2026 at 4:40 pm

    Even after editing the question, I’m still not 100% sure what you are after. You are mentioning two images and how they are positioned relative to one another but it sounds like the problem is really that they are overlapping another part of the page. Floating an element will allow you to position an element and have the rest of its parent’s content wrap around it, like a picture in a news article for example. You can also position divs side by side but that gets a little trickier.

    Originally, you mentioned wanting to position one image below another and have those two move together, in which case you would wrap the images in a div and then float the div however you wanted.

    In this updated question, it sounds like you would basically just want the images to appear below your page’s navigation bar. Without knowing the details, I assume the images are overlapping your page header because they are floated and they are siblings (at the same level in the DOM tree) with the navigation bar’s markup. You could do a couple things to fix that. First, you could give the images a margin-top value that’s equal to the height of the navigation bar. But that’s definitely a hack. Here’s a better approach…

    Without example HTML, it sounds like you really have two different parts of a page – a header/nav bar and the body of your page. If that’s the case, then I would use a div for each. The images would presumably be wrapped in the body’s div and no matter how you float them it within that body div, they shouldn’t ever overlap the header’s div. For example…

    <body>
        <div id="navigationHeader">
            <a href="http://www.google.com">Navigation Option 1</a>
            <a href="http://www.google.com">Navigation Option 2</a>
        </div>
        <div id="pageContent">
            <img src="http://www.google.com/intl/en_ALL/images/srpr/logo1w.png" style="float:left;" />
            Even though the image is floated left, it still won't overlap the page navigation header.
        </div>
    </body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 4 different divs. The last one is footer. How can I put
Where are all of the places you can put CSS style information on an
I know that CSS can be used to control the presentation of (X)HTML in
What are the aspects of style sheets (CSS) that can lead to poor performance
I know that you can apply CSS in order to style objects in Flex
I need a CSS selector that can find the 2nd div of 2 that
Where do I find a good CSS editor that can help me use all
I'm trying to find a CSS selector that can help me distinguish between the
I am looking to put the hyperlink in a different place. How can I
I have a nested CSS menu that I can't get the submenus to come

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.