/    Sign up×
Community /Pin to ProfileBookmark

pb with ´<DIV> and <SPAN> with NS4

hello

I have a problem with my Layers on NS4
the problem is that
I have several layers on my page as follow

<div id=”DIV0″ style=”LEFT:150px;VISIBILITY:visible; POSITION: absolute; TOP: 10px”>
<span style=”FONT-SIZE: 14pt; COLOR: navy; FONT-FAMILY: Arial”><b>My DIV2</b></span></div>

<div id=”DIV1″style=”LEFT:150px;VISIBILITY:visible; POSITION: absolute; TOP: 50px”>MY DIV1</div>

The pb is that when in a function I want to have the number of layers in my page(document.layers.length)it return only 1 layer.But when I put the layer in which I have the <span> tag in the last position , it return the good number. It seems that it does not recongnize layers which are placed after the layer in which there is a <span> tag.
Is their a conflict between div and span??

Any Ideas please

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@crh3675Apr 11.2004 — NS4 will only regonize a DIV or SPAN as a layer if the position is aboslute or relative. Change your span to have a "position:relative" and see if that works.
Copy linkTweet thisAlerts:
@gil_davisApr 11.2004 — NS 4 sometimes has a problem with inline styles (styles that are specified in the tag). You can tell if this has happened by using View|Source on the page. If you see
tTyle ...
after the SPAN tag, then that is what has happened.

Try assigning the CSS using the CLASS attribute instead.
×

Success!

Help @beral75 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.8,
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,
)...