Test

With all the
and styles you have, it's hard to tell exactly what you want. If you can explain that, perhaps someone can suggest a method to accomplish it. Gary [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Gary [ip] => reply@newsgroup [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 3 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> vertically aligning text with css - Macromedia Dreamweaver

vertically aligning text with css - Macromedia Dreamweaver

i'm using css to control the style of a page and having problems vertically aligning text. i'm using the stylesheet to create a rollover effect whereby the whole background colour of the td cell changes. this is the css: ----------------------------------------- menuLink a { vertical-align: middle; } td.menuLink a { width:140px; display: block; text-align: center; height: 40px; vertical-align: middle; } div.menuLink a { vertical-align: middle; text-decoration:none; } div.menuLink a:link { color: #ffffff; background: #993333; vertical-align: middle; } div.menuLink a:active { color: #ffffff; background: #CC6666; vertical-align: middle; } div.menuLink a:visited { color: #ffffff; background: #993333; vertical-align: middle; } div.menuLink a:hover { color: ...

  1. #1

    Default vertically aligning text with css

    i'm using css to control the style of a page and having problems vertically
    aligning text. i'm using the stylesheet to create a rollover effect whereby
    the whole background colour of the td cell changes.

    this is the css:
    -----------------------------------------

    menuLink a {
    vertical-align: middle;
    }

    td.menuLink a {
    width:140px;
    display: block;
    text-align: center;
    height: 40px;
    vertical-align: middle;
    }


    div.menuLink a {
    vertical-align: middle;
    text-decoration:none;
    }

    div.menuLink a:link {
    color: #ffffff;
    background: #993333;
    vertical-align: middle;
    }

    div.menuLink a:active {
    color: #ffffff;
    background: #CC6666;
    vertical-align: middle;
    }

    div.menuLink a:visited {
    color: #ffffff;
    background: #993333;
    vertical-align: middle;
    }

    div.menuLink a:hover {
    color: #ffffff;
    background: #FF3333;
    vertical-align: middle;
    }


    and this is the code on each td:
    -----------------------------------------

    td {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    }

    as you can see, i've resorted to including "vertical-align: middle;" in
    almost every css definition, and it's still not working!

    could anyone please tell me why?

    many thanks in advance

    andy.




    andy Guest

  2. #2

    Default Re: vertically aligning text with css

    andy currington wrote:
     
    I dont think css supports vertical text aligning yet.

    osgood Guest

  3. #3

    Default Re: vertically aligning text with css

    On Thu, 7 Aug 2003 12:48:50 +0100, "andy currington"
    <com> wrote:
     

    Because the text is being aligned to the middle of itself, not its
    container. Perhaps this will illustrate:

    <html>
    <head>
    <style type="text/css">
    <!--
    ..midalign {
    font-size: 14px;
    line-height: 128px;
    vertical-align: middle;
    border: 1px solid black;
    }
    -->
    </style>
    </head>

    <body>
    <p class="midalign">Test</p>
    </body>
    </html>

    With all the <div> and <td> styles you have, it's hard to tell exactly
    what you want. If you can explain that, perhaps someone can suggest a
    method to accomplish it.


    Gary
    Gary Guest

Similar Threads

  1. vertically justifying text in irregular text frames
    By thomas_marotta@adobeforums.com in forum Adobe Indesign Macintosh
    Replies: 10
    Last Post: December 26th, 01:27 PM
  2. Is there a way to orient text vertically?
    By wolfv in forum Coldfusion - Advanced Techniques
    Replies: 7
    Last Post: July 30th, 02:32 AM
  3. Vertically align text in a drawn text block
    By Paul_Urgero@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 3
    Last Post: August 20th, 09:07 PM
  4. Centering text vertically in a text block
    By Tim Murray in forum Macromedia Freehand
    Replies: 0
    Last Post: November 13th, 04:00 AM

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
  •