| View previous topic :: View next topic |
| Author |
Message |
WebMonkey33609
Joined: 12 Jul 2004 Posts: 3 Location: CA
|
Posted: Mon Jul 12, 2004 10:59 am Special Problem here concerning Images and Tables |
|
|
|
Hi.....
Well to get right to it, my problem is kind of weird. For some reason whenever I have an image inside a table, it displays not only the image but a transparent strip right below the image as well. This doesn't really work for me as the page I'm making has to have several images flush together. I have tried everything I can think of....declaring the height of the Table, the image, turning off all the borders, and I'm just stumped. To only add to the confusion, the page views fine in Mozilla but just gets messed up in IE with the previously mentioned transparent Strips below the images. I'm wondering if there maybe some issue with IE that I just don't know about. Well any help any one could lend me would be greatly appreciated.
WebMonkey33609 |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8260 Location: Castle Rock CO USA
|
Posted: Mon Jul 12, 2004 4:34 pm |
|
|
|
Welcome to the forums WebMonkey33609
Do you have some of the source code to help us see your problem a bit better?
Thanks! |
|
WebMonkey33609
Joined: 12 Jul 2004 Posts: 3 Location: CA
|
Posted: Mon Jul 12, 2004 6:27 pm Source |
|
|
|
Here an example of what I'm doing...
| Code: |
<HTML>
<HEAD>
<TITLE>
John's Website
</TITLE>
</HEAD>
<BODY bgcolor="#5B5B5B">
<CENTER>
<TABLE bordercolor="black" cellpadding="0" cellspacing="0" border="1">
<TR>
<TD>
<IMG src="john.gif" alt="My Name" />
</TD>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>
|
Basically I'm having trouble displaying an image inside a <TD>. When I put any image in there, IE adds on a little transparent strip at the bottom and what I'm trying to do is get the bottom of the image flush with the bottom of the border. I'm sure there is some command either with the <IMG> or the Table that can get rid of it, its just I don't have the slightest idea what that command might be. Thanks |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8260 Location: Castle Rock CO USA
|
Posted: Mon Jul 12, 2004 8:00 pm |
|
|
|
Try this:
| Code: |
<HTML>
<HEAD>
<TITLE>
John's Website
</TITLE>
</HEAD>
<BODY bgcolor="#5B5B5B">
<CENTER>
<TABLE bordercolor="black" cellpadding="0" cellspacing="0" border="1">
<TR>
<TD>
<IMG src="john.gif" alt="My Name" /></TD>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>
|
|
|
mjpliv

Joined: 11 May 2004 Posts: 406 Location: Nova Scotia
|
Posted: Tue Jul 13, 2004 4:56 am |
|
|
|
| What's the extra slash "/" for in the image tag? |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8260 Location: Castle Rock CO USA
|
|
mjpliv

Joined: 11 May 2004 Posts: 406 Location: Nova Scotia
|
Posted: Tue Jul 13, 2004 5:21 am |
|
|
|
| Corey, according to the page you referenced there should be an extra space between the tag contents and the "/" for it to work with some browsers. There is just a single space in the example posted here. That might be the problem. |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8260 Location: Castle Rock CO USA
|
Posted: Tue Jul 13, 2004 5:25 am |
|
|
|
Not too sure if it was exactly that - I just noticed when I moved that TD up, it seemed to close the gap. I think though that he just gave me the very basic coding that he was having a problem with (hopefully)  |
|
mjpliv

Joined: 11 May 2004 Posts: 406 Location: Nova Scotia
|
Posted: Tue Jul 13, 2004 9:38 am |
|
|
|
If I was a betting man then I would say that XHTML requires the "/" to simulate the closing of the tag. If the tag is not closed the it would appear that XHTML includes the white space as part of the document displayed by the browser. According to the XHTML tutorial some browsers won't recognize the "/" unless there are two spaces before it.
It would explain why it worked in on browser for WebMonkey33609 and not in another. |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8260 Location: Castle Rock CO USA
|
Posted: Tue Jul 13, 2004 9:42 am |
|
|
|
| Just something else for me to learn LOL |
|
WebMonkey33609
Joined: 12 Jul 2004 Posts: 3 Location: CA
|
Posted: Tue Jul 13, 2004 6:36 pm Tim-may! |
|
|
|
ok...i feel like a retard now...TiM-MaY!....thanks for the help, the problem was that I was trying to make things to organized and when I had the </TD> command on the next line, it inserted that space there. Thanks for the help.
WebMonkey |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8260 Location: Castle Rock CO USA
|
Posted: Tue Jul 13, 2004 6:42 pm |
|
|
|
Glad to have helped - it took me a few minutes. I am like that myself - like it all organized but I guess some browsers dislike organization  |
|
eXcentra
Joined: 12 May 2004 Posts: 91
|
Posted: Tue Jul 13, 2004 8:08 pm |
|
|
|
In XHTML, you're supposed to close the tag that the <img/> tag is in on the same line.
Example,
| Code: |
<div>
<img src="pic.jpg"/></div>
<a href="page.htm">
<img src="picture.jpg"/></a>
|
I was working on my site and I had this exact same problem except that I don't remember why the gap is created there. Someone explained to be but I don't remember. |
|
|