Results 1 to 5 of 5

Thread: Center text with CSS

Hybrid View

  1. #1

    Thread Starter
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772

    Angry

    How do I do this? Right now I am doing {text-align: center;}, and it doesn't work. I also tried {align: center;}, but that won't work either. Can anyone help?
    Alcohol & calculus don't mix.
    Never drink & derive.

  2. #2
    Lively Member
    Join Date
    Feb 2001
    Posts
    87
    it's not much of a problem if you use Dreamweaver.
    try this...tell me if it works..

    .center {text-align: center}

    good luck
    MohamadHassan<equuelus@icqmail.com>

    Javascript,VBScript,ASP,LearningVBfor.NET

    ICQ:7205608

  3. #3

    Thread Starter
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    I finally got it, it turns out I have to use divs instead of spans.
    Alcohol & calculus don't mix.
    Never drink & derive.

  4. #4
    Lively Member
    Join Date
    Feb 2001
    Posts
    87
    do you know what the difference is, between span and div??
    MohamadHassan<equuelus@icqmail.com>

    Javascript,VBScript,ASP,LearningVBfor.NET

    ICQ:7205608

  5. #5
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602
    <span> is usually used inline and does not have an HTML alignment attribute where the <div> tag does. In HTML you could have <div ALIGN = "center">. This cannot be done with the <span> tag and since no attribute exists in HTML for it you cannot set it in a style.
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

Posting Permissions

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



Click Here to Expand Forum to Full Width