Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

I have a div inside a div and its not co-operating.

Featured Replies

I have a div inside a div, and when content is entered into the said div the outer div's height is not affected to represent the scale of the inner div, but when i increase the height of the inner div with css it increases the height of the outer div, so my question is...

 

How do i allow the content of one div effect the height of another div it is inside without using css to change the height. (I need A to change the height of B as text is entered).

 

Also note all A's are floating..

 

divdivdiv.jpg

Can you post a link to a page, or post your basic HTML and CSS here?

 

So long as you don't specify a fixed height B should normally expand to fit A's content, without seeing the code it's impossible to guess :)

  • Author

its my homepage http://www.swansea.me/

 

I current have set the height of B manualy so imagine i have not i guess...

 

I think it is working actualy, my problem now is the div under is being overlapped by one of the floating div's.

 

 

update: fixed that by adding padding to the bottom of B, now i need to figure out how to get that signature in the right place..

  • Author
You shouldn't need to set a height on B... just left it expand/contract naturally with the content.

 

I got it working now, had to set the overflow "auto" for firefox (IE was ok) also dreamweaver was not displaying it correctly without an auto overflow. Just a compatability issue in the end..

 

<_<

 

thanks swiped for pointing me towards the tag

I think you could have solved that by adding an empty div with clear: both; after the last A block.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.