PHP forums, MySQL forums, Web Development resources

Home PageHome    PHP ResourcesTopic List    FAQFAQ    SearchSearch    MemberlistMemberlist    UsergroupsUsergroups 
 RegisterRegister
    ProfileProfile    Log in to check your private messagesLog in to check your private messages    Download the RSS Reader RSS Feed Download the RSS Reader RSS for this forum Log inLog in 

PHP Forum :: MySQL Forum :: Java Script Forum



on hover background image

 
Post new topic   Reply to topic    WeberForums.com Forum Index -> Cascading Style Sheets
View previous topic :: View next topic  
Author Message
sudhakararaog



Joined: 19 Sep 2007
Posts: 119

PostPosted: Tue Mar 02, 2010 11:59 am    Post subject: on hover background image Reply with quote

i am using the following code to show a background image when the mouse moves on a div

<div class="logobg">
</div><!-- logobg ends -->

.logobg{
float: left;
width: 736px;
height: 384px;
background: url(logo.jpg) no-repeat 0px 0px;
}

.logobg:hover{
float: left;
width: 736px;
height: 384px;
background: url(logorollover.jpg) no-repeat 0px 0px;
}

this is working fine in all browsers except for ie6 in ie 6 when i move the mouse over the logogb div the logorollover.jpg does not appear

i have tried the following

<div class="logobg">
<!--[if IE 6 ]>
<div id="logo">
<img src="assets/img/logo.jpg" id="logoie" onmouseover="over()" onmouseout="out()">
</div>
<![endif]-->
</div><!-- logobg ends -->

function over(){
document.getElementById("logoie").src="logorollover.jpg";
}

function out(){
document.getElementById("logoie").src="logo.jpg";
}

also tried using

function over(){
var imgsrc=document.getElementById("logoie").getAttribute("src");
document.getElementById("logoie").setAttribute("src",
"logorollover.jpg");
}

function out(){
var imgsrc=document.getElementById("logoie").getAttribute("src");
document.getElementById("logoie").setAttribute("src", "logo.jpg");
}

the image is not changing in ie6

please advice thanks
Back to top
View user's profile Send private message
leahmarie



Joined: 31 Jul 2009
Posts: 60

PostPosted: Tue Mar 02, 2010 6:00 pm    Post subject: Reply with quote

IE 6 is one pain in my butt, when I develop a website, I usually have to check in IE 6 if it looks good on it. I suggest you create a simpler type of your website fitted on IE 6. Where is your visitor's the highest? Focus on those visitors because they are the one's you want to look good with.
Back to top
View user's profile Send private message
Display posts from previous:   
WeberTrivia Questions WeberTrivia Questions
 Think you are smart? Prove it!. Try your skills with these questions :
 WeberTrivia QuestionsRecursive arrays and multi-dimensional arrays are one and the same. (PHP and MySQL)
 WeberTrivia QuestionsThe \"cache_dir\" tag of the squid configuration has a default of /var/spool/squid. (Linux)

WeberTrivia Questions



Post new topic   Reply to topic    WeberForums.com Forum Index -> Cascading Style Sheets All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
PHP Forum :: MySQL Forum :: Java Script Forum