Jump to content

Absolute positioning inside non-blocks


davej

Recommended Posts

I think setting the position on the <td> element itself to relative should be enough. I haven't done the test myself, though, but I can't see why it wouldn't work.

Link to comment
Share on other sites

No, just setting the td to position relative doesn't make the inner elements reference their position to the td, and if I change the td to display:block or inline-block then of course the table goes crazy.

Link to comment
Share on other sites

Hmm, I guess that you do need a <div> inside it then. You probably will have to set the width and height of that <div> in px or some other fixed unit, though. <td> elements are dynamic in size, so there's no "100%" to be referenced from.

Link to comment
Share on other sites

Well, it certainly is annoying that there seem to be so many different cases. Inside a block element it works but then there are something like 12 other different display types.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...