Click to See Complete Forum and Search --> : Prevent overlapping of absolute divs


thetrat
10-23-2008, 03:50 AM
Hi to all,

I am creating an event planner which means that I have a calendar like in html generated by server side script, with users created events stored in a database that are displayed with floating divs that can span across many days.

Events can be added/edited at any time by many users, and I can not modify the way they add or modify it. Therefore I can have many events on any day and an event can last an indefinite number of days.

The problem is that some of the event will overlap, is there any way in html /css to prevent the <div> with absolute position to overlap without any javascript ?

Thanks a Million,

Alex :)

felgall
10-23-2008, 03:54 AM
The simplest way when you don't want things to overlap is to not use position:absolute since the use for position:absolute is to allow elements to overlap and you only need it to do overlapping.

thetrat
10-23-2008, 04:04 AM
Well its complicated, I need the divs to overlap the calendar grid but not each other....

chas3142
10-25-2008, 04:15 AM
Can you put the event divs inside a container div? The container div to have position:absolute so that it can overlap the calender but the event divs inside the container float?