2 pixel background alligns with firefox, but not with IE.

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Shaneckel
Forum Commoner
Posts: 48
Joined: Fri Sep 23, 2005 3:46 am
Location: Pittsburgh, PA

2 pixel background alligns with firefox, but not with IE.

Post by Shaneckel »

http://www.shaneckel.com/diane/index.php

Works fine in firefox. off by a pixel in IE.

Has anyone come across this problem or know a way to fix it.

any help would be greatly appreciated.
User avatar
wtf
Forum Contributor
Posts: 331
Joined: Thu Nov 03, 2005 5:27 pm

Post by wtf »

Set cellpadding=0 and cellspacing=0 on all your tables. If you omit those values browser will use some default value which may be causing your problem.

However, probably the best thing to do is to exclude lines from the images that are composing your layout. Convert those images to gif with trasparent background.
Shaneckel
Forum Commoner
Posts: 48
Joined: Fri Sep 23, 2005 3:46 am
Location: Pittsburgh, PA

Post by Shaneckel »

Clever thinking, but dosen't help me.

anyone else know how to solve this?
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

Code: Select all

<td width="75%"> <div align="center"> 
        <table border="0" cellpadding="0" cellspacing="0" width="715">
What's up with the DIV? Why not <td width="75%" align="center"> ?

I'm not sure where you are off by a pixel. Could you describe it. I don't have IE. 8O
Shaneckel
Forum Commoner
Posts: 48
Joined: Fri Sep 23, 2005 3:46 am
Location: Pittsburgh, PA

Post by Shaneckel »

well, its a table with multiple cells. The entire table sits from the top 1 pixel lower in IE than in mozzilla.

thus ruining my design.
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post by matthijs »

First of all, validate your html. Add a doctype. Then, what neophyte suggested, I would try to remove the div and see what that does. You never know.
Shaneckel
Forum Commoner
Posts: 48
Joined: Fri Sep 23, 2005 3:46 am
Location: Pittsburgh, PA

Post by Shaneckel »

well, it turns out IE sucks. I ended up just using index gifs instead. And I got away with that because of the pixelated background.

The lesson today would be that you can't use curves to a pixelated background and have it line up in all browsers.
MinDFreeZ
Forum Commoner
Posts: 58
Joined: Tue Feb 14, 2006 12:28 pm
Location: Lake Mary, FL

Post by MinDFreeZ »

I've done it before you silly guy.

lol

-yea, I can see why you dont want to use that transparent crap.. its rough looking.... post the old one for me and ill see if there are any css hacks u can use (sounds like u just needed to move the whole table down 1 px for IE, that shouldn't be a problem at all)
Last edited by MinDFreeZ on Fri Feb 17, 2006 12:58 pm, edited 1 time in total.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Shaneckel wrote:well, it turns out IE sucks. I ended up just using index gifs instead. And I got away with that because of the pixelated background.

The lesson today would be that you can't use curves to a pixelated background and have it line up in all browsers.
Glad you realised it :P The fact is... IE doesn't follow the box model standards set by the w3c and there's a whole host of issues in relation to borders, padding and margins... I won't go into it... but there's a lot.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

d11wtq wrote: Glad you realised it :P The fact is... IE doesn't follow the box model standards set by the w3c and there's a whole host of issues in relation to borders, padding and margins... I won't go into it... but there's a lot.
Always refer to references if they are available. :)

One list of horrors in IE: http://www.positioniseverything.net/ie-primer.html
User avatar
Moocat
Forum Contributor
Posts: 143
Joined: Wed Oct 12, 2005 9:28 am
Location: USA

Post by Moocat »

I actually managed to develop a page which was entirely BLANK in IE somehow :)
MinDFreeZ
Forum Commoner
Posts: 58
Joined: Tue Feb 14, 2006 12:28 pm
Location: Lake Mary, FL

Post by MinDFreeZ »

Moocat wrote:I actually managed to develop a page which was entirely BLANK in IE somehow :)
You just confused me
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Moocat wrote:I actually managed to develop a page which was entirely BLANK in IE somehow :)
IE does this sometimes when there are combinations of floating layers with non-float layers. Sometimes the page springs to life when you click on a particular area, or even just mouseover it. it can usually be solved by applying float to some of the other layers. Yet another annoying bug I know.
Shaneckel
Forum Commoner
Posts: 48
Joined: Fri Sep 23, 2005 3:46 am
Location: Pittsburgh, PA

Post by Shaneckel »

aestetically it looks fine because the background is pixelated like the sides. I've been in a <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span>-hole of busy lately, but I can see this problem coming up in the near future. Thanks for all the help and the reinsurance of IE's terribleness.

If I was IE I'd have a mouth full of shotgun with my toe on the trigger.
MinDFreeZ
Forum Commoner
Posts: 58
Joined: Tue Feb 14, 2006 12:28 pm
Location: Lake Mary, FL

Post by MinDFreeZ »

Glad u got it figured out, but if u ever have a problem with something being a little off in IE, post it again - u probably could have fixed it with a small IE CSS hack.
Post Reply