Leosquarez – Website Design and Development

Website Design and Development

If you are wandering if is possible to make a  entire div is clickable this is the trick you have to use:

<div onclick=”location.href=’URL’;” style=”cursor: pointer; height:50px; width:150px”>

Remember to make an entire div tag clickable you have to use the “onlick” function and set the URL you want to link and very important is to change the cursor style to a pointer, to usability purpose.

Is important after to set the height and width.

DONE!

razer-pro-click-mobile-mouse

Popularity: 1% [?]

Posted by leosquarez On February - 9 - 2010 Web Development

Alternative solution to fix the Z-index embed video or flash issue:

——

Add this code in your head

<script type=”text/javascript” src=”swfobject.js”></script>

<script type=”text/javascript”>
swfobject.embedSWF(”URL-VIDEO“, “UNIQUE-NAME“, “WIDTH“, “HEIGHT“, “9.0.0″, false,
false,
{wmode:”opaque”,quality:”high”,bgcolor:”#000000″,salign:”tl”},
{id:”UNIQUE-NAME“,name:”UNIQUE-NAME“}
);
</script>
—–
Add this in the body where you want to add the script:
<div id=”UNIQUE-NAME“></div>
—–
DONWLOAD THE JAVASCRIPT HERE:

Popularity: 2% [?]

Posted by leosquarez On October - 1 - 2009 Uncategorized

Today i add a video in one of my client web site and i realise that the drop down menu was disappearing below the video.

The video embedding code was:

<object height=”340″ width=”560″>
<param name=”movie” value=”URL-VIDEO”>
<param name=”allowFullScreen” value=”true”>
<param name=”wmode” value=”opaque”>
<param name=”allowscriptaccess” value=”always”><embed src=”URL-VIDEO” type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” height=”WIDTH” width=”HEIGH”>
</object>

I realise that was a Z-INDEX issue (more info on z-index), i did check on the web for few solution.

First solution that i found was:

SWFObject, Flash and the z-index

This solution suggest to:

  • Set wmode=”opaque” combined with positioning
  • Wrap the object with a div with position: relative and set the object position: absolute.

CODE

#wrapper { position: relative; }
#overlay { position: absolute; }

-----
<script type="text/javascript">

   var flashvars = {};
   var params = { wmode: "opaque" };
   var attributes = {};

   swfobject.embedSWF("video.swf", "flash", "width", "height", "7",
                      "expressinstall.swf", flashvars, params, attributes);

</script>

-----

<object id="flashcontent" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400">
   <param name="movie" value="movie.swf" />
   <param name="wmode" value="opaque" />

   <!--[if !IE]>-->
   <object type="application/x-shockwave-flash" data="video.swf" width="550" height="400">
   <param name="wmode" value="opaque" />
   <!--<![endif]-->

      <p>Please update your Flash Player</p>

   <!--[if !IE]>-->
   </object>
   <!--<![endif]-->

</object>

Popularity: 8% [?]

Posted by leosquarez On October - 1 - 2009 Web Development

Subscribe here

VIDEO

TAG CLOUD