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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:40:00+00:00 2026-05-25T13:40:00+00:00

I have 2 questions or rather clarifications I need related to CSS overflow property..It

  • 0

I have 2 questions or rather clarifications I need related to CSS overflow property..It is said that

Boxes with an overflow value other than visible will expand vertically
to enclose any floated descendant boxes.

Also regarding margins, it is said that

Margins will never collapse for a box with an overflow value other
than visible.

Could you please explain these 2 points with any practical use of the same..It would be great if you could include any example to demonstrate the same.

My demos on this;

http://jsfiddle.net/emeRJ/13/

http://jsfiddle.net/emeRJ/12/

  • 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-25T13:40:01+00:00Added an answer on May 25, 2026 at 1:40 pm

    1) if you have an element that has overflow set to something different than “visible”, the height of the element will be expand according to the float elements inside.

    check this example: http://jsfiddle.net/emeRJ/3/

    since i haven’t defined the height for the box, it will be expanded by the floating blocks inside. Only because overflow is not “visible”.. So if you set the overflow to visible, the box wont consider the floating elements and the height of the box will be 0 (in the example, if you change the overflow to visible you wont see the gray background)

    So there are different behaviors when using overflow, float and height (or width) together.
    Overflow will tell the browser what to do with the content that can’t fit in the box (if you have defined the dimensions of the box), Float will put elements next to each other respecting the dimensions of the parent element, and height and width will delimit the visible area

    [ even more complicated ] in the example, when the overflow to visible, you could still force the box to expand if you add a clearer element inside:
    http://jsfiddle.net/emeRJ/4/

    2) for the second, you should really read the link given by @feeela about collapsing margins… =P

    Hope this helps

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

Sidebar

Related Questions

i have questions that i am really need some help on it: i develop
There's this snazzy captcha that asks questions rather than displaying pictures. You can read
I have a general question that is rather open-ended (i.e. depends on platform, application
I have a rather theoretical question. My company has a working standard (documented) that
I have a rather simple question that I could normally debug myself, but I
If I have a chunk of css styles that are applied within a certain
I have a rather unique problem that I'm having trouble solving. I have a
I have 3 questions concerning memory allocation that I thought better to put into
my question is rather simple, if you have an pure virtual class (interface) but
Have a rather simple question. Does anyone knows if i can use jparallax both

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.