Link to home
Start Free TrialLog in
Avatar of tonelm54
tonelm54

asked on

100% width of parent

Quite a silly question, but I'm trying to fit a div element into the parent by setting width:100%; however its overflowing the parent, see my example in jsfiddle

As you can (hopefully) see:-
User generated image
Any ideas whats going wrong? Setting the width 100%
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

You have 5px of padding so it sticks out 10px. Try padding:5px 0.
ASKER CERTIFIED SOLUTION
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
There also appears to be something funky with your jQuery. When you click on a title that is already selected, the .divBody for the title collapses and then expands again. I'm not sure if this is the desired effect, but it just behaves different than I was expecting.