SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2003
    Location
    uk
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    text alignment both left and right

    hi,

    I've got some html :

    <div class=ItemHeader>Events</div>

    styled like:

    .ItemHeader { color:black; font-size:11px; font-weight:bold; text-align:left; background-color: #D9CEC3;padding: 5px 0px 5px 5px;}

    ok so far ...

    I want to add a '+' sign in the same line as the Events text but have the '+' aligned on the righ hand side, kind of like:

    Events +

    anyone tell me waht css I need to use to achieve that effect??
    tia.

  2. #2
    SitePoint Guru hifigrafix's Avatar
    Join Date
    Oct 2005
    Location
    Nashville, TN
    Posts
    628
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    look up "float"

  3. #3
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
     <div class=ItemHeader><span>Events</span>+</div>
    
    .ItemHeader { text-align: right; }
    .ItemHeader span { float: left; }

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2003
    Location
    uk
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks Tyssen.


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
  •