treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Span Problem - Font Change on 1 Line

  • Please help....
    I have placed the <h5> with a portion in the middle meant to go blue caps. But instead of achieving everything I read that is supposed to happen - the word BLUE jumps to the next line AND "then back to black" jumps to a third line.

    My code is below.....
    UGH -- can anyone point me in the right direction? It is all meant to be on one line.

    Thanks, Jennifer


    <h5>
    This text is black and <span class=\"homeblue\">blue</span> then back to black.
    </h5>



    /**************** Black Intro ****************/
    h5
    {
    background-color: transparent;
    color: #000000;
    font-family: \"Trebuchet MS\", Arial, Helvetica, sans-serif;
    font-size: 1.3em;
    border-style: hidden;
    font-style: italic;
    font-weight: normal;
    text-align: left;
    line-height: 25px;
    }


    /**************** Home Emphazied Blue Text ****************/
    span.homeblue
    { color: #00468b;
    font-size: 1.3em;
    text-transform: uppercase;
    font-weight: bolder;
    font-style: italic;
    }
  • Here is a screen capture of what I am getting with the above code
  • That should be fine the way it is. I'm assuming its the other properties in your stylesheet that is causing your problem. I would look for some thing like a display:block; on a span in one of your heading properties.

    I would also learn short hands: http://www.smashingmagazine.com/2008/08 ... -css-code/
  • I did have another span with display: block;
    Thanks! New to CSS and I wouldn't have known to look for that and that the two codes were fighting.