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

The Archive Base Latest Questions

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

I have setup a container and three divs inside. First two are floated and

  • 0

I have setup a container and three divs inside. First two are floated and third one is not floated. (fourth div is added just to elaborate my question)

I have changed border of first two divs to be transparent to depict it more clearer that thirdDiv is starting right from the firstDiv while placing content of itself (‘THIRD’) right after secondDiv.

Content of thirdDiv (‘THIRD’) is placed right after secondDiv

And you can see that thirdDiv is actually have border started right from the start

So, my question is that do next to floated element (thirdDiv) gets padding from that direction by default? As it showing to be 155px in my code.

  • 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-29T21:52:28+00:00Added an answer on May 29, 2026 at 9:52 pm

    No, the nonfloated elements don’t get padding by default. the container starts underneath your floated divs. However, the content in the div respects the float and is pushed to the right. If you apply overflow:hiddento the non-floated container, then it has an “automatic margin”, respecting the floated divs. (You can see this here – the left border appears.)

    EDIT: effectively it is like a padding, although there is no padding!

    Example with overflow hidden.

    Example without overflow hidden and no padding

    Example without overflow hidden and padding left

    note the border and the placement of the extra text!

    EDIT 2: depending on what the greater value is, either the padding defined by your css, or the calculated padding (width of the floats) is being applied. In every case, your defined padding and the “calculated-float-padding” do collapse!

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

Sidebar

Related Questions

I have a website with the following setup: <div id=container> <div id=header></div> <div id=content></div>
THE SITUATION I have a series of divs setup to contain various content: <div
I have a dependency injection container setup in my application and I'm thinking that
How would I setup my controls for the following situation?: I have a parent-container
I have setup multiple SQL Service Broker Queues in a database but have not
I have setup coredata in my appDelegate, but it first loads the mainWindow.xib and
I have two classes, Car and Person. Car has as one of its members
Here's the setup: I have a tab bar controller with two tabs. There is
Given the following setup, I have three assemblies. Web (ASP.NET MVC 3.0 RC1) Models
The Setup: I have a page written in JS that has 3 main divs:

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.