April 3, 200917 yr I have used a javascrpit file to make the png transparency working in IE6 but the links within the image have stopped working when i introduced this code. When i take the javascript file out you get that light blue colour around the png images and the transparency does not work but the links work? Below is my code for the map. It works in firefox, ie7 etc.. If your thinking make the image have a solid background i cant as the main background has a gradient: <img class="map" src="img/hotel_map.png" alt="Select a hotel" border="0" usemap="#Map" style="margin-left: 50px;" /> <map name="Map" id="map"> <area shape="poly" coords="100,208,106,196,200,201,201,223,115,223,110,240,83,244,82,222" href="/newquay" alt="Newquay" /> <area shape="poly" coords="208,172,296,174,295,197,286,203,289,216,274,227,225,196,211,191" href="/torquay" alt="Torquay" /> <area shape="poly" coords="350,136,488,134,488,161,469,169,463,186,438,186,418,163,348,159" href="/bournemouth" alt="Bournemouth" /> <area shape="poly" coords="495,204,520,204,517,177,544,180,553,200,581,208,584,225,497,227" href="/shanklin" alt="Shanklin" /> </map> Anyone have a solution for getting the links to work in IE6 with the transparency working as well?? Cheers Edited February 2, 201016 yr by Sam G added [code] tags
April 6, 200917 yr Just a thought, and totally depending on your design, how about using 8 bit pngs, as they will preserve the transparency for all recent browsers and behave like transparent gifs for IE6. This could look messy if you've got a gradient background, but if it's a solid colour and you select that colour as the Matt for the png, it will look fine. HTH
April 7, 200917 yr Hi, what JS are you using? The reason I ask is that you have to make sure that the <area>s have a click event rather than the <img>s
April 8, 200917 yr Author Just a thought, and totally depending on your design, how about using 8 bit pngs, as they will preserve the transparency for all recent browsers and behave like transparent gifs for IE6. This could look messy if you've got a gradient background, but if it's a solid colour and you select that colour as the Matt for the png, it will look fine. HTH Cheers for answering. I fixed the problem about 15mins later and i actyually did it the way shonk said but i was told quicker by another developer. Cheers
April 8, 200917 yr Yea, it works sometimes, totally dependant on your background (or if you don't care about IE6). I've found that it's so much easier that using some Javascript to solve the problem and looks better too. Glad you got it sorted.
Create an account or sign in to comment