/    Sign up×
Community /Pin to ProfileBookmark

Hi!

i’ve got two DIVs, and want to have this twice in same window’s position and changing from one to another clicking over them. I’ve created the two layers and positioned one relatively to a td, other one positioned absolutely to the same position of the “linked” div… then i can see one over another, but when i change window resolution, the effect stop working and i see one div separated from the another div… is any way to have the two layers one over another all time?

thanks in advance!

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@DaiWelshApr 07.2005 — Sounds like you need either position:relative with a negative value (which should position the element relative to where it "should" go in the document flow) or maybe negative margins to achieve the same thing, though I think at least one and maybe both of these will not be perfectly cross-browser. You could also postion both absolutely, but I am guessing there is some reason that you wanted one positioned in the document flow (i.e. in the table cell).

Maybe if you explain the problem you are trying to solve instead of the way you are trying to solve it that may get a better response?

HTH,

Dai
×

Success!

Help @morsa801tons 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.18,
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,
)...