473,473 Members | 1,513 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

img tag prob with valign

If I put an image in a table cell, it aligns with the top of the cell
regardless of the valign tag.

For example the following page:
************************
<html>
<head>
<title>
a page to try to understand the valign tag
</title>
</head>
<body>
<table width="100%">
<tr>
<td height="50" width="100%">aa
</td>
</tr>
<tr>
<td height="30" width="100%" background="top_menu_back.jpg">
bb
</td>
</tr>
<tr>
<td height="50" width="100%">cc
</td>
</tr>
</table>
</body>
</html>
****************************
Shows the letter bb virtically aligned in the centre of the second table
cell <td>

But if I put an image in the cell IE

*************************
<html>
<head>
<title>
a page to try to understand the valign tag
</title>
</head>
<body>
<table width="100%">
<tr>
<td height="50" width="100%">aa
</td>
</tr>
<tr>
<td valign="middle" height="30" width="100%" background="top_menu_back.jpg">
<img src="history_up.gif" border="0">
</td>
</tr>
<tr>
<td height="50" width="100%">cc
</td>
</tr>
</table>
</body>
</html>
**************************
The image aligns at the top of the cell regardless of the valign tag.

Why is this?

How can I align the image in the centre (virtical) of the cell?

Thanks

Bruce
Jul 20 '05 #1
0 16714

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

Similar topics

5
by: John | last post by:
Below is my code. It seems that no matter what I do, I cannot get the following list of places to start at the top of the cell. It is always centered in the middle of the cell. Is vAlign the...
1
by: james | last post by:
Hi there, I'm using the FOP from xml.apache.org/fop tool to convert from HTML to PDF. I'm reading the height and valign attributes of a column-cell (TD) in the XSL file:
12
by: Phil Powell | last post by:
Consider my code: " multiple size="5"> <option value="/images">Main Image Storage Bin</option> <option value="/images/demo-four">demo-four</option> <option value="/images/Demo3">Demo3</option>...
0
by: Arne | last post by:
I use valign=top frequently in my web pages. This attribute doesn't always do anything in a complicated layout of nested tables. I don't know how I get my nested tables mixed up so that valign=top...
1
by: Cezar | last post by:
Hello, I need to valign the content of the columns in DataGrid. I tried the obvious thing Valign = "top" in <asp:DataGrid ..> but it doesn't seem to be working. Besides working with...
0
Savage
by: Savage | last post by:
I'm making for fun a simple program which format a input file.Input file sustain of person name,lastname and date of birth.Output file si supposed to be forammted as following: NAME ...
2
by: mnacw | last post by:
Can anybody help me to resolve this prob. i have installed Visual Studio 2005 Professional edition. I am working in VB.Net. When I tried to connect to database it is connected but when i make some...
2
by: Talghagin | last post by:
Hi i'm using the below code which i need that when the user clicks on the "drag.gif" the whole div is drag and droped. The code works fine if i put the image out of the table... any suggention on...
6
by: Jeigh | last post by:
Hello, I've been designing a graphic to be behind a form. So I figure the best way to do this is to make a table, use a background image for a cell and then put the form inside that. That has all...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.