I have a table, with many tds. I want to display a div behind this to give the appearance of it having rounded corners. I have called the Div within a th. Here is a jsFiddle example of the problem.
I thought I could do it using position: realtive; and z-index: -100; yet it doesn’t seem to be what I want.
Thanks to anyone for any help.
I think you’ll need a different approach. For the
<div>to be the same height as the<table>, you’ll need the<div>to wrap the table:That’ll also make the
<div>appear “behind” the<table>without fiddling withz-index.From your jsFiddle example, I think you only want the background behind one table column? To achieve this, you’ll need to:
<table><div>to the width of the column you want it to be the background for (or a little wider)<div>to the width of the other columns in the<table><table>to minus the width of the other columns in the table.Maybe something like this?