image alingment prob with ie

liunx

Guest
Hi-<br />
<br />
Today's interesting problem of the day is I have some script that isn't aligning up correctly in the ever so forgiving browser, IE(6.0), yet the script works just fine in NS(7.0) and OP(7.)!<br />
<br />
Here is a screen shot I made and you will notice the problem to be with vertical aligning, because there is a 1px gap above the image for no reason!<br />
<br />
Screen Shot (<!-- m --><a class="postlink" href="http://www.icfm.us/colors/ie-ns-op-819x500-g.gif">http://www.icfm.us/colors/ie-ns-op-819x500-g.gif</a><!-- m -->) <br />
<br />
I assure you the script is tight; however, if you wish to see it, I'll post it.<br />
<br />
Thanks, Gandalf<br />
:D<!--content-->Show us your code please<!--content-->THE CSS<br />
<br />
body<br />
{<br />
background-color: RGB(244, 126, 83);<br />
background-image: url(images/bg_01.gif);<br />
background-repeat: repeat-x;<br />
color: RGB(244, 126, 83);<br />
margin-top: 0px;<br />
margin-left: 0px;<br />
padding-top: 0px;<br />
}<br />
<br />
.table-menu<br />
{<br />
text-align: left;<br />
vertical-align: top;<br />
color: white;<br />
background-color: transparent;<br />
width: 800px;<br />
margin-top: 0px;<br />
margin-left: 0px;<br />
padding-top: 0px;<br />
}<br />
<br />
<br />
<br />
THE HTML<br />
<br />
<table class="table-menu" cellpadding="0" cellspacing="0"><br />
<tr align="left"><br />
<td align="left" rowspan="4"><img src=http://www.htmlforums.com/archive/index.php/"images/title-side-2x131-g.gif" width="2" height="131" alt="" /></td><br />
</tr><br />
<tr align="left"><br />
<td align="left" colspan="11"><img src=http://www.htmlforums.com/archive/index.php/"images/site-2003-01-27_02.gif" width="354" height="99" alt="" /></td><br />
</tr><br />
<tr align="left"><br />
<td align="left" colspan="11"><img src=http://www.htmlforums.com/archive/index.php/"images/title-bar-798x4-g.gif" width="798" height="4" alt="" /></td><br />
</tr><br />
<tr align="left"><br />
<td align="left"><img src=http://www.htmlforums.com/archive/index.php/"images/services-72x28-off-g.gif" width="72" height="28" alt="" /></td><br />
<td align="left"><img src=http://www.htmlforums.com/archive/index.php/"images/mission-72x28-off-g.gif" width="72" height="28" alt="" /></td><br />
<td align="left"><img src=http://www.htmlforums.com/archive/index.php/"images/portfolio-77x28-off-g.gif" width="77" height="28" alt="" /></td><br />
<td align="left"><img src=http://www.htmlforums.com/archive/index.php/"images/estimates-77x28-off-g.gif" width="77" height="28" alt="" /></td><br />
<td align="left"><img src=http://www.htmlforums.com/archive/index.php/"images/links-56x28-off-g.gif" width="56" height="28" alt="" /></td><br />
<td align="left"><img src=http://www.htmlforums.com/archive/index.php/"images/faq-54x28-off-g.gif" width="54" height="28" alt="" /></td><br />
<td align="left"><img src=http://www.htmlforums.com/archive/index.php/"images/contactus-103x28-off-g.gif" width="103" height="28" alt="" /></td><br />
<td align="left"><img src=http://www.htmlforums.com/archive/index.php/"images/aboutus-90x28-off-g.gif" width="90" height="28" alt="" /></td><br />
<td align="left"><img src=http://www.htmlforums.com/archive/index.php/"images/sitemap-72x28-off-g.gif" width="72" height="28" alt="" /></td><br />
<td align="left"><img src=http://www.htmlforums.com/archive/index.php/"images/search-63x28-off-g.gif" width="63" height="28" alt="" /></td><br />
<td align="left"><img src=http://www.htmlforums.com/archive/index.php/"images/spacer.gif" width="62" height="28" alt="" /></td><br />
</tr><br />
</table><br />
<br />
<br />
<br />
So what's the diagnosis, doctor?<br />
Gandalf<br />
:D<!--content-->Just wondering if I actually found a problem that there wasn't an answer to. :)<br />
<br />
Waiting patiently, but anticipating the reply(s),<br />
Gandalf<br />
:D<!--content-->Do members receive award medals for coming up with question that have no answers?<br />
<br />
:D<!--content-->Afraid I don't have an answer for you, but I'm also having the EXACT same problem in IE! There is a 1-pixel gap between the bottom of the image and the table border, but is fine in Netscape. Any suggestions would also be greatly appreciated here.<br />
<br />
One strange thing I did notice with mine. I was fiddling about with the HTML and for some reason removed the META tags and DOC TYPE, and the gap increased to 2 pixels! Very strange.<!--content-->Without seeing your script and just guessing, I would venture to say that your 1px gap might be the way the table is scripted.<br />
<br />
Example:<br />
<br />
BAD TABLE:<br />
<table><br />
<tr><br />
<td><br />
blah blah blah<br />
</td><br />
</tr><br />
</table><br />
<br />
vs.<br />
<br />
GOOD TABLE:<br />
<table><br />
<tr><br />
<td>blah blah blah</td> keep the <td>blah</td> on the same line <br />
</tr><br />
</table><br />
<br />
Though you did mention that this table looks fine in NS; which to me would say that you are scripting your tables correctly. May want to try closing the td, tr, and table tags all on the same line; such as:<br />
<br />
<table><br />
<tr><br />
<td>blah blah blah</td></tr></table><br />
<br />
If that does in fact do the trick, that is ludicrous and IE is officially retarded, because there is no reason closing tags should be on the same line, excluding the <td></td>'s!<br />
<br />
A friend once said that I don't have normal people problems, mine always happen to be unique and I thought I was the only one out there. }:-) <br />
<br />
Gandalf<br />
:D<!--content-->Wow, closing all the tags on the same line worked! You rock, dude! Well, IE may be retarded then, but is still my favourite browser.<!--content-->What !DOCTYPE did you use?<br />
<br />
The closing / on the end of tags, is only required for XML and XHTML documents. In standard HTML it can sometimes cause odd problems:<br />
<td align="left" colspan="11"><img src=http://www.htmlforums.com/archive/index.php/"images/site-2003-01-27_02.gif" width="354" height="99" alt="" /></td><!--content-->Well, I did as you suggested and removed all of the [/]'s, but that still didn't kick it.<br />
<br />
Thanks tho,<br />
Gandalf<br />
:D<!--content-->Definately interesting this problem has become. *as Yoda would say*<br />
<br />
Well, after going over the script again and again, I found no errors; so I started adding attributes to the CSS to see if it was a scripting error. However, no luck. :( I then dropped the images into Photoshop to see if I had screwed them up and didn't realize it. Well that wasn't the case. So I then looked again and noticed that I had the background-repeat: repeat-x; which IS how I wanted it, but also noticed in my HTML that I had the background image again! For some strange reason this seemed logical when I first scripted the page. :rolleyes: Well, I took out the image in the HTML and it fixed the problem instantly. <br />
<br />
One little pixel caused by one little image created a massive headache! Who wouldda thunk!?<br />
<br />
Gandalf<br />
}:-)<!--content-->
 
Back
Top