/    Sign up×
Community /Pin to ProfileBookmark

CSS Display None not working in IE

I have the following code in the head tag:

[quote]

<script>
function show( obj ) {
var faq = document.getElementsByName( ‘FAQ’ );
for ( var i = 0; i < faq.length; ++i ) {
faq[ i ].style.display = ‘none’;
}
var ref = obj.href;
ref = ref.replace( /^[^#]+#/, ‘FAQ_’ );
document.getElementById( ref ).style.display = ”;
return false;
}
</script>

[/quote]

And then the following in the body tag:

[quote]

<div class=”style6″ id=’FAQ’ name=’FAQ’>
<img src=”images/image.jpg” />
<p>
Text BLA BLA
</div>

<div id=’FAQ_One’ name=’FAQ’ style=’display:none’; class=”style6″ >
<p>Music Video Showreel <br />

<object type=”application/x-shockwave-flash”
data=”http://site.com/flvplayer.swf?file=http://www.site.co.uk/film.flv&amp;autoStart=true
width=”400″ height=”300″>
<param name=”movie”
value=”http://site.com/flvplayer.swf?file=http://www.site.co.u/film.flv&amp;autoStart=true” />

</object>

bla bla bla </p>
</div>

<div id=’FAQ_Two’ name=’FAQ’ style=’display:none’ class=”style6″>
<p>Acting Video Showreel <br />

<object type=”application/x-shockwave-flash”
data=”http://site.com/flvplayer.swf?file=http://www.site.co.uk/film.flv&amp;autoStart=true
width=”400″ height=”300″>
<param name=”movie”
value=”http://site.com/flvplayer.swf?file=http://www.site.co.uk/film.flv&amp;autoStart=true” />
</object>
Bla bla bla
</div>

There are also links which pick up each video e.g.
<a href=’#One’ onclick=’return show(this)’ id=”li”>Video One</a>

[/quote]

In firefox the video’s open up in the same area so the video always opens up in a player in the top left corner.

However in IE If I click video 1 it opens up top left, then if i click Video 2 it opens up another video underneath video 1….

Why is this happening ?

Thanks in advance

to post a comment
CSS

0Be the first to comment 😎

×

Success!

Help @kegan5 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 6.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: @nearjob,
tipped: article
amount: 1000 SATS,

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

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