Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

div sizing

Status
Not open for further replies.

DaveC426913

Programmer
Joined
Jul 28, 2003
Messages
274
Location
CA
This is easy-peasy with tables, but I don't know how to do it with DIVs:

1]
I have a div nested inside another div. The inner div is position: absolute; right: 20px.

Problem is, my inner div is *taller* than my outer div *wants* to be - the inner div hangs off the bottom edge of the outerdiv. How can I get my outer div to expand to contain the inner div?

2]
Can I set an outer div to a fixed width, and have one of two inner divs to be variable as the browser is resized?
i.e. I want the outer div to be 100%, the inner RIGHT div to have a fixed width, and the inner LEFT div to be variable in width.
 
WRT 1, Don't make you inner or outer divs absolutely positioned, then they will both grow with each other & any content inside them.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top