Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 07-11-2005, 12:40 PM   #1
Banned
 
mysterio2099's Avatar
 
Join Date: Aug 2003
Posts: 349
Send a message via AIM to mysterio2099 Send a message via MSN to mysterio2099 Send a message via Yahoo to mysterio2099
Exclamation pixel gap (html)

Ok, I can't post the entire script because I'm designing a site for a local business, but I can post the parts that I think are the areas of interest. That said, here's the problem:

I have your basic html website, tables, pictures, bla bla bla. The menu uses a javascript onMouseOver type of script for an image flip:

Located in the HEAD tag
Quote:
index0= new Image(86,20)
index0.src = "images/index_08.jpg"
index1 = new Image(86,20)
index1.src = "images/index_over.jpg"

function IndexOver() {
document.index.src = index1.src; return true;
}

function IndexOff() {
document.index.src = index0.src; return true;
}
with the following code for each menu button:

Quote:
< A HREF="index.html" onMouseOver="IndexOver()" onMouseOut="IndexOff()" >
< IMG NAME="index" SRC="images/index_08.jpg" WIDTH=86 HEIGHT=20 BORDER=0 >
Now, the menu is in a table row that is between two other table rows. If I use basic images for the buttons this problem does not occur (keep that in mind). When using the image flip codes the bottom (3rd row) table is pushed down appx. 5 pixels. This ruins the look of the menu completely.

I'm not sure what is going on here, I've never seen this kind of problem before. If anyone can help me, please let me know.


Thank you.
mysterio2099 is offline   Reply With Quote
Old 07-11-2005, 12:51 PM   #2
It can never be too quiet
 
Stryker's Avatar
 
Join Date: May 2004
Location: Burlington, Ontario
Posts: 1,090
Hi mysterio,
You wouldn't happen to have the page you're working on available on the web would you? It would be MUCH easier to anylize the issue it we could see everything at once. You could even copy what you have to notepad and attach it to the thread.

Thanks,
Stryker
__________________
Athlon XP 2800+ • Asus A7N8X (nVidia Nforce2) • Radeon 9600 Pro 256MB • 2x512MB KVR DDR PC3200 Dual Channel • 120GB Seagate 7200RPM 8MB • 160GB WD 7200RPM 8MB • Liteon DVD±RW DL • AOpen DVD±RW DL • Vantec Ion2 350W PSUSend me your picture for the Member Photo Gallery
Stryker is offline   Reply With Quote
Old 07-11-2005, 12:58 PM   #3
Moderator
Staff
Premium Member
 
Join Date: Aug 2003
Location: Richmond, VA
Posts: 7,835
I'm not entirely sure I get what you're trying to say. You have a menu, which consists of the image rollovers that you have the scripts written for above. When you define the images without any JavaScript, it comes out perfectly, but when you do have the onMouseOver commands, the "bottom" table is pushed down 5 pixels. What do you mean by the bottom?

And as well, have you tried the rollovers without defining the height and width parameters? Does it work in any browser - in other words, are you testing them in MSIE? And a minor script comment - I believe you need "return true;" in its own line.

kram
__________________
"For today, goodbye. For tomorrow, good luck. And forever, Go Blue!"
University of Michigan President Mary Sue Coleman
kram 2.0 is offline   Reply With Quote
Old 07-11-2005, 01:00 PM   #4
Banned
 
mysterio2099's Avatar
 
Join Date: Aug 2003
Posts: 349
Send a message via AIM to mysterio2099 Send a message via MSN to mysterio2099 Send a message via Yahoo to mysterio2099
Ok, I've attached a .txt with the code, I hope it helps
Attached Files
File Type: txt index.txt (10.6 KB, 63 views)
mysterio2099 is offline   Reply With Quote
Old 07-11-2005, 01:03 PM   #5
Banned
 
mysterio2099's Avatar
 
Join Date: Aug 2003
Posts: 349
Send a message via AIM to mysterio2099 Send a message via MSN to mysterio2099 Send a message via Yahoo to mysterio2099
i just tested in Firefox and Netscape...the problem doesn't exist there. It seems to be only in IE.
mysterio2099 is offline   Reply With Quote
Old 07-11-2005, 01:14 PM   #6
It can never be too quiet
 
Stryker's Avatar
 
Join Date: May 2004
Location: Burlington, Ontario
Posts: 1,090
Thanks mysterio,
Ok first thing to try. I notice that before and after your images there are spaces inside the table cell (starts at line 117/118). You have the "href" and the "img" tags on two seperate lines with a space at the end of each.

Try changing from this:
HTML Code:
		<td colspan="3">
<A HREF="index.html" onMouseOver="IndexOver()" onMouseOut="IndexOff()"> 
<IMG NAME="index" SRC="images/index_08.jpg" WIDTH=86 HEIGHT=20 BORDER=0></A> 
</td>
To this:
HTML Code:
<td colspan="3"><A HREF="index.html" onMouseOver="IndexOver()" onMouseOut="IndexOff()"><IMG NAME="index" SRC="images/index_08.jpg" WIDTH=86 HEIGHT=20 BORDER=0></A></td>
I'll keep poking around, but give that a try and remove the spaces before and after the images.
Stryker is offline   Reply With Quote
Old 07-11-2005, 01:16 PM   #7
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
I can't tell exactly what's going on, but this may be related:

http://developer-test.mozilla.org/en...ysterious_Gaps
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.
Force Flow is offline   Reply With Quote
Old 07-11-2005, 01:20 PM   #8
Banned
 
mysterio2099's Avatar
 
Join Date: Aug 2003
Posts: 349
Send a message via AIM to mysterio2099 Send a message via MSN to mysterio2099 Send a message via Yahoo to mysterio2099
Guess what Stryker? You win. lol. Just fixing the spaces in the code worked perfect. Thanks a million man! Problem solved
mysterio2099 is offline   Reply With Quote
Old 07-11-2005, 01:21 PM   #9
It can never be too quiet
 
Stryker's Avatar
 
Join Date: May 2004
Location: Burlington, Ontario
Posts: 1,090
Wow, first try! That doesn't happen too often.
Glad it worked.
Stryker is offline   Reply With Quote
Old 07-11-2005, 01:28 PM   #10
Banned
 
mysterio2099's Avatar
 
Join Date: Aug 2003
Posts: 349
Send a message via AIM to mysterio2099 Send a message via MSN to mysterio2099 Send a message via Yahoo to mysterio2099
yeah, I was kind of surprised that just putting the code on one line fixed it...I guess I learned a leason...keep your code clean, unlike your room

Thanks again Stryker.
mysterio2099 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:53 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2