Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • Last Modified:

Aligning graphic images with text side-by-side within a table cell?

Can u help.
I have a table cell ... say ... 200wide by 30height ...
In the cell I need to display two images (20x20 each) left aligned ... and text (that linewraps to two lines).

so - image, image, text (line wraps to 2 lines of text).

the problem: ... I can valign middle the images - left justified ... but the line wrapped text refuses to play nice .. and does not vertically align correctly.

Any ideas?
Richard
0
rcbuchanan
Asked:
rcbuchanan
  • 4
  • 2
  • 2
2 Solutions
 
lherrouCommented:
Can you post your code?
0
 
jericotolentinoCommented:
Hi,

How about using 3 cells?

<table>

<tr height="30">
<td width="200" valign="top"><img src="image1.jpg" /></td>
<td width="200" valign="top"><img src="image2.jpg" /></td>
<td width="200" valign="top">Your text goes heretd>
</tr>

</table>

Although in some browsers, the height attribute of tr is not supported...
0
 
rcbuchananAuthor Commented:
I cannot. They have to be together (can't explain).

<td width="294" align="left" class="stylemyfriends1" valign="middle">
<img name="icon_want_n" src="/icon_want_1.jpg" width="14" height="14">
<img name="icon_agree_n" src="/icon_agree_1.jpg" width="14" height="14">
<a href="whatever"><cfoutput>#left(loadQuery.discussionSubject,50)#</cfoutput></a>
</td>
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
lherrouCommented:
Have you tried using align="left" for the images themselves?
0
 
rcbuchananAuthor Commented:
its the vertical alignment that is the problem, not the horizontal.
0
 
lherrouCommented:
I know, but the image alignment determines where the browser places the text next to the image. Funny quirk, but that's the way it works.
0
 
lherrouCommented:
align     top bottom    Specifies how to align the    Use styles instead
            middle left    image according to
            right             surrounding text.
                               Deprecated.
        
0
 
jericotolentinoCommented:
An alternative to tables would be CSS. Make a wrapper for the cell, then align the images where you want.

<html>
<head>
<title>My page</title>
<style>
<!--
#wrapper {
position: relative;
width: 600px;
height: 200px;
}
#image1 {
position: absolute;
top: 0px;
left: 0px;
}
#image 2 {
position: absolute;
top: 0px;
left: 250px;
}
#text {
position: absolute;
top: 0px;
left: 450px;
}
-->
</style>
</head>
<body>
<div id="wrapper">
<div id="image1"></div>
<div id="image2"></div>
<div id="text"></div>
</div>
</body>
</html>
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now