Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    You can define multiple CSS classes for use on one single instance of an HTML tag. For example, the following is valid:
    Code:
    <style type="text/css">
    .class1 {font-color: red}
    .class2 {font-size:x-large}
    </style>
    .
    .
    .
    <span class="class1 class2">This will be really big and red.</span>
    The W3C states that the classes must simply be delimited with whitespaces such as spaces or tabs. I'm assuming newlines work as well. This can be very useful to get rid of redundancy in your CSS classes.

    (hint: WDF v4 will use this)
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  2.  

  3. #2
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    Is this cross-browser compatable? I thought I'd tried that before, and anything sub the latest and greatest didn't work.
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  4. #3
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    It works fine for me in IE6 and Mozilla 1.4a, my two test browsers. God knows what NS4 or Opera will do.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  5. #4
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    Opera used to be my favorite browser until they stopped caring about anyone's definition of what HTML and CSS is. But I'm more concerted about IE5 and stuff like that... who knows.
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  6. #5
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    You can also have default properties for your element type and add classes for specifics. For example:

    Code:
    <style>
        P {font-size: 10pt}
        P.small {font-size: 8pt)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:29 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com