user5096599
user5096599

Reputation:

How to make nested DIV exact same width as parent div

I have a div nested inside another. The parent div contains the title for a drop down menu. The inner div contains the choices. I have them in different divs so that I can add a scroll to the inner div without it causing the title to scroll. I have borders around both. The inner div looks to be 1px narrower on each of the sides. How do I make the child div exactly the same width as the parent div?

Upvotes: 3

Views: 3712

Answers (2)

Donnie D'Amato
Donnie D'Amato

Reputation: 3940

That's what width:inherit; is for.

Upvotes: 3

isopach
isopach

Reputation: 1938

What's your code like?

Try this, it should work:

width: 100%;

Upvotes: 1

Related Questions