Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to align the text to right for a left float div?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27528
    yesunesun
    Member

    Hi,
    How can I create a form with two columns side by side, with left column text right aligned, and right column text left aligned?

    The below code doesn’t seem to work for the left column text is not getting right aligned. Please help.

    HTML

    Code:
    Master Service Line Description

    CSS

    Code:
    div.formfield-title{float: left;
    margin-left: 10px; margin-top: 5px; margin-right:0px;
    text-align: right;
    vertical-align:middle;}

    div.formfield{ text-align:right;
    vertical-align: middle;
    margin-right: 20px;
    margin-top: 5px;}

    #69233
    TheDoc
    Member

    You’ll probably need to assign a width to the div.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.