SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Apr 2005
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question vertically center text with image

    Helllo,

    I have an image with text next to it and would like to have the text vertically centered on the left. Is this possible? Below is what I am using.

    Thanks, sckeels:

    <TABLE style="FONT-SIZE: 14px" cellSpacing=0 cellPadding=2 width=550 border=1
    font-family:Arial? border-color:#999999; none; text-decoration:
    background-color:#3568CC; sans-serif; Helvetica, Arial, Verdana, font-family:
    color:#FFFFFF;>
    <TBODY>
    <TR>
    <TD style="FONT-WEIGHT: bold; VERTICAL-ALIGN: middle; COLOR: white;
    BACKGROUND-COLOR: #3568cc; TEXT-ALIGN: center" colSpan=4>
    <IMG style="FLOAT: left; BORDER-TOP-STYLE: none;
    BORDER-RIGHT-STYLE: none;
    BORDER-LEFT-STYLE: none;
    BACKGROUND-COLOR: transparent;
    BORDER-BOTTOM-STYLE: none"
    alt="Travel Tool"
    src="http://images/icons/jet02.jpg">
    Travel Approval Request Information</TD></TR>
    <TR>

  2. #2
    Visit docquesting.com docquesting's Avatar
    Join Date
    May 2005
    Location
    Georgia USA
    Posts
    1,264
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Perhaps this link will help. Otherwise search for css vertical text or simular keywords.

    http://www.ssi-developer.net/css/vertical-text.shtml

  3. #3
    SitePoint Evangelist Maujor's Avatar
    Join Date
    Mar 2005
    Location
    Rio de Janeiro - Brazil - South America
    Posts
    409
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    There are a lot of mistakes in your code:
    e.g. font-family:Arial? border-color:#999999; none; text-decoration: ...

    Well, I think you can achieve what you're trying using TWO cells into one table row. Put the image into the left cell and the text into the right one. This way it'll more easy to control the position both the image and the text. With a floated image is hard.
    Hope that help.
    Mauricio Samy Silva
    http://www.maujor.com/


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •