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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:16:12+00:00 2026-05-24T21:16:12+00:00

I have one ‘main’ div that that is wrapped around three child div’s. Each

  • 0

I have one ‘main’ div that that is wrapped around three child div’s. Each child div holds an image. My goal is for the three images to be evenly aligned across my page. The images are all the same size (200px by 166px). If there is some way to do this without the use of a dozen div’s that would be superb. To reiterate my question, I do NOT want all three images centered. I want the left img to be 30 pixels from the left of the page; the right img to be 30 pixels from the right of the page, and I want the center img to be perfectly centered between the two.

HTML:

    <div id="aboutimages">
        <div id="aboutimgleft">
            <img src="Stylesheets/images/manpc.jpg" alt="" />
        </div>
        <div id="aboutimgcenter">
            <img src="Stylesheets/images/coffee.jpg" alt="" />
        </div>
        <div id="aboutimgright">
            <img src="Stylesheets/images/keyboard.jpg" alt="" />
        </div>
    </div>

CSS:

#aboutimages{
text-align: center;
    width: 100%;
    margin: 0 auto;
    float:left;
    }

#aboutimgleft img{
    float:left;
    padding-bottom:20px;
    padding-top:20px;
    padding-left:0px;
    width:250px;
} 

#aboutimgcenter {
    margin: 0 auto; 
    width: 70%;
}

#aboutimgcenter img{
    text-align:center;
    width:250px;
    height:166px;
    padding-bottom:20px;
    padding-top:20px;
}

#aboutimgright img{
    float:right;
    padding-bottom:20px;
    padding-top:20px;
    padding-right:0px;
    width:250px;
    height:166px;
} 

I am desperate for any type of help – this is frustrating the living hell out of me.

Thanks,

Evan

  • 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-24T21:16:13+00:00Added an answer on May 24, 2026 at 9:16 pm

    There are several ways to pull this off, here’s one way:

    #aboutimages {
        position:relative; /* constrain absolutely positioned child elements */
    }
    
    #aboutimgleft {
        float:left; /* Float the first element */
        margin-left:30px; /* Here's that 30px you wanted */
    } 
    
    #aboutimgcenter {
        margin: 0 auto; /* Center the second element */
    }
    #aboutimgright {
        /* easier than float:right, but that could work too with some tweaking */
        position:absolute;
        top:0;
        right:30px; /* Here's that other 30px you wanted */
    }
    

    As long as the images are in those divs, they will be aligned.

    Demo: http://jsfiddle.net/KPJP4/

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

Sidebar

Related Questions

I have one div; header, and another called headerimg containing an image. I'm trying
I have one table that keeps track of links that each user has clicked
have one time consuming step that flattens a bunch of files. basically i'd like
I have one table, which having 15 columns and around 2000+ records. Now I
I have one datagridview in my windows form. That is filling data from database
I have one controller used by two different views: <div ng-controller=MyCtrl ng-include=slice = false>
I have one table that contains first name and last name of employees in
I have one Python module that can be called by a CGI script (passing
I have one costly function that gets called many times and there is a
I have one page which is divided into sections. Ιn each section I like

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.