/    Sign up×
Community /Pin to ProfileBookmark

TD position:relative

I have a big list of tabular data (so using tables is legit LOL)

but from one of the rows of cells i need a small nav that pops up (options). because you cant put position:relative on the TD itself i wrapped the contents with a div and applied it to that.

The problem is when the cell is increased in height by a neighboring TD the div remains the same height as its not aware the other TD increased its height. So when the absolutely positioned div shows up, its off (1/2 the distance of the increased height)

i know i can change the v-alignment to top and that would fix my problem, but i would hate to do that because it would cause style issues with the other TD’s. wondering if anyone has a hack or fix to this problem?

Thanks,
-aPeg

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@holyhttpOct 11.2010 — Can you paste the HTML markup of that section to clear things out?
Copy linkTweet thisAlerts:
@WebJoelOct 18.2010 — The default position of ALL elements is "position:static;"

I would try to make the TD be "position:[I]relative[/I];" and put a DIV inside of that, and make it be "position:absolute;" and therefore, it is 'out of the document flow' and will not shove borders or cells around when expanded etc.Give it a z-index greater than the TD cell and pseudo-class for [I]a:hover[/I] and voila! But I'd need to see your code to do this, something along these lines is do-able.
Copy linkTweet thisAlerts:
@apegauthorOct 18.2010 — Great, thanks for the ideas... i ended up bitting the bullet and v-aligning the cell top. This places the "position:relative" div at the top of the cell eliminating the problem i was having.

Thanks,

-aPeg
×

Success!

Help @apeg spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.3,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...