Solved

Divs inside parent sharing space

Posted on 2013-12-04
6
260 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
  • 4
  • 2
6 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
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
Comment Utility
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 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 5

Author Comment

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

Accepted Solution

by:
Silverlay earned 0 total points
Comment Utility
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
Comment Utility
Removing thouse lines would make second div always stretch to fit parent and it's just what i needed.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now