4 replies [Last post]
numbenator
Offline
newbie
Last seen: 18 years 9 weeks ago
Joined: 2004-09-27
Posts: 2
Points: 0

HI,

How do I create 2 absolute divs positioned on top of each other (content/base) that will re-align when content is added.

ie content div will contain variable data. In some instances, when too much info, it will overlay my base div. I wish to prevent this with out using relative.

cheers

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 weeks 13 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

repositioning divs

Hi numbenator,
Sounds like you would need to use JavaScript to calculate the height of the div and adjust their positions from that value.

Have you tried using relative position?

Hope that helps

numbenator
Offline
newbie
Last seen: 18 years 9 weeks ago
Joined: 2004-09-27
Posts: 2
Points: 0

repositioning divs

Thats exactly how thought have to do but have no idea where to begin with writing such a function.

I have used relative yes although requirement is to use absolute.

Don't ask why lol.

hope you can help.

cheers

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 weeks 13 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

repositioning divs

Hi numbenator,
This script might give you something to think about.
http://www.csscreator.com/css-forum/ftopic847.html

Root
Offline
Enthusiast
Brighton UK
Last seen: 15 years 42 weeks ago
Brighton UK
Joined: 2004-09-08
Posts: 76
Points: 0

repositioning divs

Well you could nest the absolutes inside a relative Smile

No class, little style and a lotta division.