Jump to content

Chrome browser background image not showing


pankaj.ghadge

Recommended Posts

Hi All, I have a issue related to google chrome browser. This browser is not showing background images. I don't know this issue is occurring because of id or shown that image in table td or javascript is used in that. when i debugged that code through chrome fire bug. it is showing me in following format. Means anchor tag and span tag are in invisible format. but i didn't apply any style related to display. In firefox and ie it works great. <td id="td-enable-actions"> <a onclick=" event.returnValue = false; return false;" id="enable-disable-0" href="/admins/enableDisable/8/login_type:1/external_id:0"> <span title="Disabled" class="disable"/></a> Note:- Above code or say anchor tag is in invisible format in chrome browser when i debugged it from firebug. but i didn't apply any style related to display none. <script type="text/javascript"> //<![CDATA[ Event.observe('enable-disable-0', 'click', function(event) { if (confirm('Are you sure you want to change the status of this Admin?')) { new Ajax.Updater('enable-disable-0','/admins/enableDisable/8/login_type:1/external_id:0', {asynchronous:true, evalScripts:true, requestHeaders:['X-Update', 'enable-disable-0'] }); } else { event.returnValue = false; return false; } }, false); //]]></script> </td> Css code as bellow:

a {default.css (line 542)color:#000000;font-weight:bold;text-decoration:none;}span.disable {background-image:url(../img/disable.png);background-repeat:no-repeat;padding-bottom:3px;padding-left:10px;padding-right:5px;}

Help me to solve this problem. Thanks in advance.

Link to comment
Share on other sites

I have found solution. we can not write only tag in anchor tag. <a href="/clients/enable_disable/20"><span class="enb" title="enbd"/></a> Does not work in google chrome browser.<a href="/clients/enable_disable/20"><span class="enb" title="enbd"/> </a>now it works in google chrome browser great.Why we can not write only tag in anchor tag. Other solutions are welcome.

Link to comment
Share on other sites

A span may not have a self-closing tag. A span requires an opening tag and a closing tag. Browsers try to understand what you mean, so it seems that adding content to your span helped the browser understand something better. But the correct structure would look like this:<a><span></span></a>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...