Solved

Divs inside parent sharing space

Posted on 2013-12-04
6
264 Views
Last Modified: 2013-12-09
Hello Experts,

I got a bit confused designing one component and would be greatfull for any help.
Basicaly a got parent div with 2 divs inside. Thing i want to archive is when .new-epmloyees div (can't take more then 50% of space) got less content in it second .birthdays div  should take all parent free space avaliable and still remain scrollable.

Example of what i already messed up could be found here: http://cssdeck.com/labs/adlq1ndp

Thanks in advance,
Silver
0
Comment
Question by:Silverlay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39696934
It looks like it works.   When I take away some of the links on the left side, the right moves over as you expect.  What am I missing?   (using chrome)
0
 
LVL 5

Author Comment

by:Silverlay
ID: 39697026
Take a look now, i've added few elements. Right side not scrolling on buttons, coz it's actualy strech over parent container and not fitting it.
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39697059
On the birthdays class, try adding overflow:auto; then add a lot more links and see what happens.  example http://cssdeck.com/labs/xssryrm6
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Author Comment

by:Silverlay
ID: 39697558
Get scrollbar to the end. Second div not showing full content.
0
 
LVL 5

Accepted Solution

by:
Silverlay earned 0 total points
ID: 39697599
Got it. All we have to do is remove

  min-width: 50%;
  max-width: 100%;
  display: inline-block;

from .birthdays declaration, and it works like charm.
0
 
LVL 5

Author Closing Comment

by:Silverlay
ID: 39705744
Removing thouse lines would make second div always stretch to fit parent and it's just what i needed.
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Scroll listener getting fired on initial page load 2 15
CSS (jquiry mobile) question 3 32
Multiple of Image Swaps 5 39
Why is my select returning NaN 18 21
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question