473,394 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

HTML Table, Images and Text

Hi,

I am a little bit confused. Maybe someone can explain what I am doing
wrong.

I have a table with 2 cells in it. In the first cell I have an image.
The image is left aligned and centered. In the second cell I also put
an image. It is also left aligned and centered. It works wonderfull.
But now I add some Text to the second cell. Baff - the valign is
broken.

<TD width="10" align="left" valign="middle"><IMG src="plus.gif"></TD>
<TD align="left" valign="middle"><IMG src="folder.gif">blah</TD>

What happens. The folder.gif is not valign centered. If I enter
valign=absmiddle for the image all is wonderfull on IE(6). But not on
Mozilla 1.4. Can someone explain me why this is happening? And how can
I correct it?

cu
Bjoern Wolfgardt
Jul 20 '05 #1
3 16497
Bjoern Wolfgardt wrote:

I have a table with 2 cells in it. In the first cell I have an image.
The image is left aligned and centered. In the second cell I also put
an image. It is also left aligned and centered. It works wonderfull.
But now I add some Text to the second cell. Baff - the valign is
broken.

<TD width="10" align="left" valign="middle"><IMG src="plus.gif"></TD>
<TD align="left" valign="middle"><IMG src="folder.gif">blah</TD>

how can I correct it?


This might help.
http://devedge.netscape.com/viewsource/2002/img-table/

Have you considered using CSS to suggest a presentation?

--
Brian
follow the directions in my address to email me

Jul 20 '05 #2
Brian <us*****@mangymutt.com.invalid-remove-this-part> wrote in message news:<hB******************@rwcrnsc51.ops.asp.att.n et>...
Bjoern Wolfgardt wrote:

I have a table with 2 cells in it. In the first cell I have an image.
The image is left aligned and centered. In the second cell I also put
an image. It is also left aligned and centered. It works wonderfull.
But now I add some Text to the second cell. Baff - the valign is
broken.

<TD width="10" align="left" valign="middle"><IMG src="plus.gif"></TD>
<TD align="left" valign="middle"><IMG src="folder.gif">blah</TD>

how can I correct it?


This might help.
http://devedge.netscape.com/viewsource/2002/img-table/

Have you considered using CSS to suggest a presentation?

Hi,

thx alot. Now I know why it happens. But I think the only solution is
to split the second cell into two seperate cells. That leads me to
another problem. The cell width is not recognized by IE. Mozilla does
it correct (as I understand it).

Here is a little example:
<TABLE ID="1" Border="1" cellpadding="0" cellspacing="0">
<TR ID="tr">
<TD width="20" align="center" valign="middle"><IMG
src="plus.gif" onclick="toggle(this)"></TD>
<TD width="20" align="center" valign="middle"><IMG
src="root.gif" onclick="SelectNode(this)"></TD>
<TD onclick="SelectNode(this)" align="left" valign="middle"
nowrap>RootNode</TD>
</TR>
<TR style="DISPLAY:">
<TD align="left" valign="top"></TD>
<TD align="left" valign="top" colspan="2"><TABLE ID="1.3"
Border="1" cellpadding="0" cellspacing="0">
<TR>
<TD width="20" align="center" valign="middle"><IMG
src="plus.gif" onclick="toggle(this)"></TD>
<TD width="20" align="center" valign="middle"><IMG
src="folder.gif"></TD>
<TD align="left" valign="middle" nowrap><A
onclick="SelectNode(this)">SubNode 1.3</A></TD>
</TR>
<TR style="DISPLAY:">
<TD></TD>
<TD colspan="2"><TABLE ID="1.3.1" Border="1" cellpadding="0"
cellspacing="0">
<TR>
<TD width="20" align="center" valign="middle"><IMG
src="plus.gif" onclick="toggle(this)"></TD>
<TD width="20" align="center" valign="middle"><IMG
src="folder.gif"></TD>
<TD align="center" valign="middle" nowrap><A
onclick="SelectNode(this)">SubNode 1.3.1</A></TD>
</TR>
<TR style="DISPLAY:none">
<TD></TD>
<TD colspan="2"></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<TABLE ID="1.2" Border="1" cellpadding="0" cellspacing="0">
<TR>
<TD width="20" align="center" valign="middle"><IMG
src="plus.gif" onclick="toggle(this)"></TD>
<TD width="20" align="center" valign="middle"><IMG
src="folder.gif"></TD>
<TD align="left" valign="middle" nowrap><A
onclick="SelectNode(this)">SubNode 1.2</A></TD>
</TR>
<TR style="DISPLAY:none">
<TD></TD>
<TD colspan="2"></TD>
</TR>
</TABLE>
<TABLE ID="1.1" Border="1" cellpadding="0" cellspacing="0">
<TR>
<TD width="20" align="center" valign="middle"><IMG
src="plus.gif" onclick="toggle(this)"></TD>
<TD width="20" align="center" valign="middle"><IMG
src="folder.gif"></TD>
<TD align="left" valign="middle" nowrap><A
onclick="SelectNode(this)">SubNode 1.1</A></TD>
</TR>
<TR style="DISPLAY:none">
<TD></TD>
<TD colspan="2"></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
Jul 20 '05 #3
Bjoern Wolfgardt wrote:

But I think the only solution is to split the second
cell into two seperate cells.
If it's tabular data in the table, then you cannot split it into two
tables. If it is not tabular data, mark it up with table elements.
< http://www.allmyfaqs.com/faq.pl?Tableless_layouts >
Here is a little example:
<TABLE ID="1" Border="1" cellpadding="0" cellspacing="0">
<TR ID="tr">


[code snipped]
It does not, in fact, look like tablular data. See link above. Other
than that, I cannot really make out what's going on with your table by
looking at it in you message. There is too much spacing, causing
wrapping and making it all a bit of a mess. Give us a url instead.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: josh dismukes | last post by:
/// here is the code i'm getting a parse error on the last line of the code which /// is </html> any help will be much appreciated. <?php session_start ();
2
by: Venkat | last post by:
Hi, My HTML page doesnot work properly in Netscape 7.1. But works fine in Opera 7 and IE 6.0. I could not figure out the problem. If any one could/suggest it would be nice.. This piece of HTML...
3
by: rvanvolken | last post by:
After sending an email message formatted for HTML using the STMP Mail function within .NET, my message arrives with exclamation marks throughout the text, which inadvertantly hinders the correct...
2
by: Roel Korsten | last post by:
Hello all, I've got a strange one: I'm sending HTML mail via the System.Web.Mail namespace: Dim ObjEmail As New MailMessage Dim sb As New StringBuilder ObjEmail.To =...
7
by: KelsMckin | last post by:
What is the easiest way to retreive the html source from a web page? Could you please provide an example? Any and all help would be greatly appreciated
4
dizyn
by: dizyn | last post by:
Hi here is errors list, i have solved many but these few are not getting solved. Please help me. Line 5 column 113: character data is not allowed here. Line 15 column 6: end tag for "HEAD" which...
0
by: punitshrivastava | last post by:
Hi to All, I am Punit Shrivastava.i created one html page for this i cde like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
5
by: smittie31 | last post by:
I am having a problem with a border around me html page. The border does not flow thru the whole html page, it cuts off halfway. --> See http://keithborom.com/marlon-sanders CSS STYLESHEET ...
7
by: imtmub | last post by:
I have a page, Head tag Contains many Scripts and style sheet for Menu and Page. This code working fine and displaying menus and page as i wanted. Check this page for reference....
2
by: sateeshchandrasanga | last post by:
Hi All, My HTML code is working fine in Firefox.But its not displaying any thing in IE.Can you help me in this problem.And in Google crown its displaying but not properly. ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.