SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: centering text

  1. #1
    SitePoint Member
    Join Date
    Feb 2003
    Location
    india
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    centering text

    hi,

    I have a class defintion like this

    .catbg {

    padding-top: 3px;
    padding-right: 3px;
    padding-bottom: 3px;
    padding-left: 3px;
    font-weight: bold;
    font-height: 18px; FONT-SIZE: 13px; COLOR: #000000;background-color: #F6F7EB}

    As the background is more than 400 pixels i wanted to align the text in the center

    Is there any other way to align text in the center other than changing items in class definitination like
    padding-left:180px;
    padding-right:180px

  2. #2
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    .catbg {
    text-align: center
    ...
    }
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature


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
  •