Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    349
    Thanks
    2
    Thanked 0 Times in 0 Posts

    TWO CSS styles in ONE tag..possible?

    hey,

    can you put two css styles in one class tag?

    for example..

    .me {font-weight:bold}
    .yell{font-color:red}


    div class="me.yell">some text here</div>

    is this possible....

    to use 2 or more styles in ONE class

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    -27° 28' 22" , 153° 1' 22"
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts
    BrightNail,

    I don't believe that can be done. The syntax class="xx.xx " I think can only be used when referencing a html tag e.g
    h1.style {font-color: red;}

    The example you provided could easily be grouped together e.g.

    .meandyell {font-weight: bold; font-color: red;}

    <edit>

    I knew I would be corrected...learning stuff everyday

    </edit>
    Last edited by JustAsking; 09-25-2002 at 02:04 AM.
    "Computers are considered female - As soon as you make a commitment to one, you find yourself spending half your paycheck on accessories for it."

  • #3
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,461
    Thanks
    1
    Thanked 23 Times in 21 Posts
    <div class="me yell"></div>

    Separated by spaces.

    It's in the HTML spec.
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog


  •  

    Posting Permissions

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