/    Sign up×
Community /Pin to ProfileBookmark

CSS Layers for Images, Layers for Text

I’m trying to position an image right over some text, hiding the text from the viewer.

I’m using CSS layers to try to accomplish, with the z-index function.

However, what I am getting right now is the image, and then the text following.

To compound the issues further, my text and image are in a cell of a table. The table boundaries need to be set to the viewers screen, so setting absolute positions are not possible for me.

What I have so far is:

[CODE]<td>
<img src=”black.gif” width=”150″ height=”75″ style=”position:relative; z-index:2;”>
<p style=”position:relative; z-index:1;”>Text Set 1</p>
<p style=”position:relative; z-index:1;”>Text Set 2</p>
</td>[/CODE]

Thanks for any help. ?

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@Stephen_PhilbinNov 06.2004 — Use absolute positioning instead of relative. ?
×

Success!

Help @shopkanji 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.20,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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