This is a discussion on "Expanding div moving other div" within the Web Page Design section. This forum, and the thread "Expanding div moving other div are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Expanding div moving other div
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Expanding div moving other div
Hello
I have a div (#content) which is used to display all the content. This div should be able to expand depending on how much content is in there. That isn't the problem. I also have another div (#bottom) which is used for links and copyright information. What i want to do is if the content div is very long, the bottom div is moved so that it directly underneath the content div at all times. I am having trouble becuase the bottom div doesn't move and the content div is underneath Here is the CSS i used: #content { width: 545px; z-index: 1; position: absolute; padding: 5px; top: 180px; left: 220px; overflow: visible; border: none; } #bottom { width: 545px; height: 18px; position: absolute; background-color: #ffffff; top: 800px; left: 220px; text-align: center; } If anyone could help it would help me out no end!! |
|
#2
|
|||
|
|||
|
Re: Expanding div moving other div
Your problem is because you have used
Give your 'content' div a
If the 'bottom' div is the next element after the 'content', then give that a
There may be issues that need to be addressed based on other styling code you have but you get the idea. |
|
#3
|
|||
|
|||
|
Re: Expanding div moving other div
I think i got it now.....many thanks for the quick reply
|
|
#4
|
|||
|
|||
|
Re: Expanding div moving other div
That works a treat but I have a couple more questions.....
1. Can the content div have a minimum height so if there isn't much content the bottom div still stays at the bottom of the page? 2. I have a navigation div next to the content div. Can I set it so the navigation div is exactly the same height of the content div so it's level at the bottom? Any help is greatly appreciated Adam |
|
#5
|
|||
|
|||
|
Re: Expanding div moving other div
Yes you can. The css code is:
Try having the following sequence of css inplace.
|
![]() |
| Tags |
| expanding, div, moving, other |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Expanding Divs.. Need Help :( | FXDesigns | Web Page Design | 10 | Jan 30th, 2008 16:06 |
| Div not expanding down | Lchad | Web Page Design | 5 | Feb 13th, 2007 20:37 |
| DIV expanding too far | Echilon | Web Page Design | 2 | Dec 31st, 2006 16:39 |
| expanding menu | brunette | JavaScript Forum | 3 | Dec 7th, 2006 23:56 |