IE 6 AND 7 "onmouseover" alignment problem

This is a discussion on "IE 6 AND 7 "onmouseover" alignment problem" within the Web Page Design section. This forum, and the thread "IE 6 AND 7 "onmouseover" alignment problem are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 12th, 2006, 11:59
New Member
Join Date: Jul 2006
Location: Cairns
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
IE 6 AND 7 "onmouseover" alignment problem

Gidday gang,

I'm currently trying to iron out some bugs in a site I'm working on, and one of them really has me stumped.

The problem exists in both IE 6 & 7 - it does not exist in Firefox, Opera, Netscape or Safari.

Explanation:

(it's probably easiest to see this for yourself: Go to the page

When a user mouses over a thumbnail, it triggers the "onmouseover" event, which changes the source of 'image380' from nothing to the (full-size) thumbnail image. The problem is that in IE, the mouseover also causes the margin-left and margin-top CSS to disappear, and the thumbnail re-aligns itself into the top-left hand corner (not centered).

The margin-left:4px;margin-top:2px; CSS is in the thumbborder class. I've tried adding .thumbborder a:hover with the relevant margins to my css (no difference) If anyone has any suggestions I'd be really appreciative - this one really has me stumped. :-S

Cheers,
- JB


HTML:

Code: Select all
<a class='thumbnail' href='template.php?templateid=380'>
<img src='images/bid_andreas02_thumb.png' class='thumbborder' border='0' onmouseover='document.images.image380.src="images/bid_andreas02_full.png"' alt='bid_andreas02' />
<span>
<img name='image380' src='' alt='bid_andreas02' />
<br />
bid_andreas02
</span>
</a>
CSS:

Code: Select all
.thumbborder {
    border: solid 1px #CCC;
    margin-left:4px;
    margin-top:5px;
    width:140px;
    height:112px;
    
    }

.thumbnail{
position: relative;
z-index: 0;
}

.thumbnail:hover{
background-color: transparent;
z-index: 50;
}

.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: #ffffe0;
padding: 5px;
left: -1000px;
border: 1px dashed gray;
visibility: hidden;
color: black;
text-decoration: none;
}

.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;
}

.thumbnail:hover span{ /*CSS for enlarged image on hover*/
visibility: visible;
top: 0;
left: 60px; /*position where enlarged image should offset horizontally */

}
Reply With Quote

  #2 (permalink)  
Old Dec 12th, 2006, 13:15
New Member
Join Date: Jul 2006
Location: Cairns
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: IE 6 AND 7 "onmouseover" alignment problem

*grin*

Hi Guys,

I searched far & wide, but never managed to come up for an answer for this. If anyone's interested, I got around it (sort-of) with a padding call for the parent div & some IE6 CSS hacks. :-)
Reply With Quote
  #3 (permalink)  
Old Dec 13th, 2006, 11:09
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: IE 6 AND 7 "onmouseover" alignment problem

I don't see the problem in IE7. When I mouse over the far right hand column, it actually expands the page adding a horizontal scrollbar. Is that what you mean?
Reply With Quote
  #4 (permalink)  
Old Dec 13th, 2006, 13:22
New Member
Join Date: Jul 2006
Location: Cairns
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: IE 6 AND 7 "onmouseover" alignment problem

Hi Ichad,

Since the padding workaround, the problem does not appear in IE6 or 7. It's not an ideal solution, but it gets the job done. Thanks for looking anyway. :-)
Reply With Quote
Reply

Tags
alignment, css, html, ie6, ie7, onmouseover, xhtml

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a "tag" system to find relevant "related" pages MrQuestions PHP Forum 3 Mar 20th, 2008 23:06
[SOLVED] Show "Image" Depends On User "Status"? Monie Classic ASP 6 Oct 16th, 2007 01:22
? IS "meta name="robots" content="?" necessary in pages ? Love2Java Starting Out 6 Aug 8th, 2007 13:48
window.opener.document["nameForm"].getElementById("someid").value; doesnt work drpompeii JavaScript Forum 0 Feb 17th, 2007 23:09
<option value="yes" class="x"> problem in Firefox mameha1977 Web Page Design 1 Jun 21st, 2006 11:20


All times are GMT. The time now is 23:31.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43