Wednesday, August 3, 2022

[FIXED] What is the best way to have a div overlap multiple table cells

Issue

I am building a calendar web page using jQuery and asp.net-mvc similar to this and I can't figure out how this example is supporting events that span multiple days (it shows the event as a single item across multiple days in the view).

Using firebug, I see that the calendar is simply a table:

enter image description here

but I can't figure out how they have the event div that crosses multiple cells of a table like the "Long Event" in the image below?

enter image description here


Solution

Combining the answers above:

<TD style="position: relative">
  <DIV style="position: absolute; z-index: ?; width: ?px;... ">
  </DIV>
</TD>

you may need to provide a z-index to ensure that your element appears on top of other table cell contents..



Answered By - wrschneider
Answer Checked By - Mary Flores (PHPFixing Volunteer)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.