Forum Moderators: not2easy

Message Too Old, No Replies

Firefox CSS Absolute Image not displaying

problem using absolute css in firefox / ie

         

roundz

9:16 pm on Nov 9, 2010 (gmt 0)

10+ Year Member



I have a website that is Flash.

I wanted to add a css div to display a small facebook logo on the top right of the browser window.

I added what I think is the correct code, I tested on SAFARI and it works properly. On Firefox and IE, it does not display the image/link at all.

HOW CAN I GET THIS IMAGE TO DISPLAY ON ALL BROWSERS?


So on my index.html page that contains the embedded flash movie, I added the following:


To the <head>


<style type="text/css">
<!--
.div-1a {
position:absolute;
top:15;
right:0;
width:200px;
}
-->
</style>

To the <body>

<div class="div-1a">
<a href="MYLINK"><img src="MYIMAGE" border="0" alt="Visit Our Facebook Page" /></a>
</div>

Major_Payne

10:37 pm on Nov 9, 2010 (gmt 0)



Any reason why you didn't put the ACTUAL HTML code you are using? Dump those CSS stuff: "<!--" and "-->". You forgot to add "px" to the top: 15:


<style type="text/css">
.div-1a {
width:200px;
height: YYpx;
position:absolute;
top:15px;
right:0;
}
</style>


Always tell the browsers what you want, don't make them "guess":

<p><a href="URL path to external link" title="Mouseover Description"><img style="width: XXpx; height: YYpx; border: 0;" src="Path to image" alt="Text Description"></a></p>

roundz

2:36 pm on Nov 10, 2010 (gmt 0)

10+ Year Member



I updated the code and still the same. The image is displayed on Safari but not on IE or Firefox.

SuzyUK

3:43 pm on Nov 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



have you tried adjusting the z-index of .div-la,

and/or

it could be the settings of the Flash movie have you tried adding
<param name='wmode' value='transparent'>
and the
wmode="transparent"
attribute to the <embed> code

roundz

4:34 pm on Nov 10, 2010 (gmt 0)

10+ Year Member



Hmm.. I did that. Now it works on Safari and IE... but still not on Firefox ?

SuzyUK

9:48 am on Nov 11, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



closer then.. ;) - which worked, the z-index or the transparency parameter on the swf object? - and did you put the wmode parameter on both the the <object> and the <embed>

added: just found this discussion about using wmode transparent or opaque [stackoverflow.com] it appears that using opaque may be the better solution to stop flash hiding other objects, without affecting the performance of your flash movie.. maybe worth a try?

roundz

2:10 pm on Nov 11, 2010 (gmt 0)

10+ Year Member



opaque did it! thanks :-)