Help - Search - Members - Calendar
Full Version: help with CSS alignment (xhtml strict)
Invision Power Services > Community Forums > Community Web Design and Coding
Trel
Currently I have
CODE
    <td style="vertical-align: bottom; text-align: left; width: 52%; height: 70px;">
 <div style="width: 40%;  float: left;">
     <a href="./out.php?oid={SID}">
   <b>{M_NAME}</b>
     </a>
     <br />
     <img src="{M_LOGO}" alt="{M_NAME}" />
 </div>
 <div style="width: 60%;  float: right;">
     {DESCRIPTION}
 </div>
    </td>


That's producing Click to view attachment

Now, based on the picture, I want the {DESCRIPTION} to be bottom aligned within the <td> while keeping the other info middle aligned within that same <td>

How can I do that?
If that's not possible, then how can I just bottom align the whole thing.
Payton
QUOTE(Trel @ Apr 10 2005, 05:28 PM)
Currently I have
CODE
    <td style="vertical-align: bottom; text-align: left; width: 52%; height: 70px;">
 <div style="width: 40%;  float: left;">
     <a href="./out.php?oid={SID}">
   <b>{M_NAME}</b>
     </a>
     <br />
     <img src="{M_LOGO}" alt="{M_NAME}" />
 </div>
 <div style="width: 60%;  float: right;">
     {DESCRIPTION}
 </div>
    </td>


That's producing Click to view attachment

Now, based on the picture, I want the {DESCRIPTION} to be bottom aligned within the <td> while keeping the other info middle aligned within that same <td>

How can I do that?
If that's not possible, then how can I just bottom align the whole thing.
*


technically since it is "tabular data" the "title" (google) and "description" should be in seperate <td>'s

Why can't you just use 2 <td>'s to accomplish what you need to do?
Trel
because I want it in that once cell and don't really want to do the whole table within a table thing.
IAIHMB
If you're doing what I think you're doing, why don't you just make the image a link, float it, and align the text where you want it? If you're not doing what I think you're doing, just use a paragraph with relative positioning? Don't mean to be persistent, but if it isn't tabular data you could probably do it easier and more effeciently with DIVs and CSS. ermm.gif
Trel
well, with the exception of the one cell there, it is tabular data.
But I've tried using plain text instead of the image, and still I cannot get them to align differently, which is what I need help doing because they do not align how I tell them too.
Payton
QUOTE(Trel @ Apr 11 2005, 02:33 AM)
because I want it in that once cell and don't really want to do the whole table within a table thing.
*


tables are designed to have more than one cell. it's not a "table within a table" it's just a cell in a table...

CODE
<table><tr><td>Google</td><td>Description</td></tr></table>
Trel
no, misunderstand. I don't want to split that cell into two. I'm trying to keep that info with in it's <td> not make it two because that'll cause problem later with CSS styling I plan to do.
IAIHMB
You could always insert a DIV, float it to the right, and set the top margin to half of the TDs height minus the height of hte DIV that you are adding. original.gif
Trel
QUOTE(IAIHMB @ Apr 11 2005, 07:02 PM)
You could always insert a DIV, float it to the right, and set the top margin to half of the TDs height minus the height of hte DIV that you are adding. original.gif
*


I'm not sure if that'll work only because the description might span multiple lines. Maybe I'm going to have to split it into multiple cells.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.