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

  • Home
  • SEARCH
  • 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 7571101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:35:28+00:00 2026-05-30T15:35:28+00:00

How do i go about piecing each and every div together? I’m learning how

  • 0

How do i go about piecing each and every div together?

I’m learning how to code in CSS and i’m fairly new, and i want to piece 3 – 8 pieces of the divs in each row. Once i’ve pieced some together, they appear uneven inside the dreamweaver IDE (and also inside the browser display).

Also, how do i get to resize them automatically? I’ve been trying width:100%; but all i’m getting is weird resized shapes and sizes.

If you don’t get what i mean, my webpage technically looks like this

----------------------------------------------------------------------------------
|                                                                                |
|                               background image 1                               |
|--------------------------------------------------------------------------------|
|                       |            |                    |                      |
|     bg img 2          |   bg img 3 |  bg img 4          |    bg img 5          |
|                       |            |                    |                      |
|--------------------------------------------------------------------------------|
|                                                                                |
|                           background image 5                                   |
|                                                                                |
|--------------------------------------------------------------------------------|

but everytime i put my divs in the same row with a containing div for each row, i.e

<div class="container">
    <div id="bg1" width:100; height:20;>
        <div id="bg2" width:150; height:20;>
            <div id="bg3" width: 250; height:20; >
                <div id="bg4" width:130; height:20;>
                </div>
            </div>
        </div>
    </div>
</div>

it gets all jumbled up at the same location. Am i doing something wrong?

Would appreciate if someone could tell me a step by step solution…

Once again, i want to go about doing:

  1. Construction of website with CSS for the layout.
  2. Auto resizing of entire page according to web browser size.

Thanks.

  • 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-30T15:35:30+00:00Added an answer on May 30, 2026 at 3:35 pm

    First, don’t use inline styles for prototyping something when you’re a beginner. They’re too hard to edit live. It will slow the process way way down.

    You sound new to this, but that’s cool! We all started somewhere.

    Create your 5 divs first, and give them each a unique ID. IDs are for things that only appear on the page once. Classes are for things that appear more than once, or might at some future point appear more than once.

    Then link a css file that your a separate declaration for each div. You’re on the right track with width=100% for responsive design, although in practice it’s often something like 92% even for a “full-width” div, because a little spacing is nice, and borders and padding add to the overall width. A 90% width div with 6% padding is always wider than the window itself (greater than 100%) which makes for strange behavior, so keep the box model in mind from the start.

    Here are some tips I wish somebody had broken down to me early on:

    Nowadays things are a LOT easier than they used to be for rapid prototyping CSS. The best way to figure this stuff out is to edit the stylesheet live in Chrome Developer Tools. Download and install Chrome if you’re not using it already. Control click on your div and choose “Inspect Element.” Play around in the inspector, and see how all the CSS styles can be edited live by doubleclicking on them and entering new values. If you click the “resources” tab you can see your whole stylesheet at once, and similarly edit the properties, and even add new ones. The best way to see what’s happening with sizing is to temporarily declare an outline like:

    #mydiv1 {outline: 2px dashed red;}
    

    because outlines don’t add to the width of the element, unlike borders. Then when you’re done you can remove the outline declarations. Also keep in mind that any changes to a document’s CSS in Chrome Dev Tools will be lost when you navigate away. So copy and paste your work into a text editor as you go.

    If you’re interested in responsive design, which is great, once you’re getting good at all of the above, buckle in and read Ethan Marcotte’s book:

    http://www.abookapart.com/products/responsive-web-design

    Marcotte’s instructional approach is to start with pixels and then translate into percentages and ems in the stylesheet, but it doesn’t need to be that way. You can design “live” with those variables in the browser.

    hope this helps!

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

Sidebar

Related Questions

About 6 months ago I rolled out a site where every request needed to
about 10% of the time when I go to compile code that should compile,
About to start a new project in VS2010 which will have a few windows
I have researched quite a bit about this but mostly by piecing other questions
About a year ago, a manager in another department brainstormed that I could code
//About Button in the principal menu final Button button3 = (Button) findViewById(R.id.button3); button3.setOnClickListener( new
I've been piecing together a project of mine, and one of the key aspects
About 6 months ago I bought a gallery photo popup code. It came with
About once every 20 page loads, I get a glitch in my View. I'd
About every 3rd time my app serves a particular update action (two that I've

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.