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 4 of 4

Thread: css style help

  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    css style help

    hi can someone please explain this CSS code to me thanks

    .myNewStyle {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: #FF0000;
    }
    .my2ndNewStyle {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: #FF0000;
    }
    .my3rdNewStyle {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    font-size: 12pt;
    color: #FF0000;
    }

  • #2
    New Coder
    Join Date
    Jun 2008
    Posts
    29
    Thanks
    0
    Thanked 2 Times in 2 Posts
    It does exactly what it says. Any HTML element that has any of those classes will have those CSS styles applied to them.

    For example:

    Code:
    <span class="my2ndNewStyle">Testing</span>
    Will apply the style for .my2ndNewStyle. The values are:

    font-family: Verdana, Arial, Helvetica, sans-serif;

    This means that it will use the font Verdana, and if that font is not found, use the second, and so on.

    font-weight: bold;

    This turns the font bold

    color: #FF0000;

    This turns the font to the color red (hex is written as RRGGBB, with F being the highest value and 0 being the lowest)


    So, overall, text will look like this:
    Testing


    I hope this wasn't homework

  • #3
    New to the CF scene
    Join Date
    May 2009
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    thanyou it and no it isnt homework

  • #4
    hkp
    hkp is offline
    New Coder
    Join Date
    May 2009
    Posts
    11
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by deldel View Post
    hi can someone please explain this CSS code to me thanks

    .myNewStyle {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: #FF0000;
    }
    .my2ndNewStyle {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: #FF0000;
    }
    .my3rdNewStyle {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    font-size: 12pt;
    color: #FF0000;
    }
    In this code three class are made. In the every class font style, font weight, color of the text has been declare.

    this can be used in the html code as below....

    <p class="my3rdNewStyle>your text</p>


  •  

    Posting Permissions

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