Possible To Change Color Of <h1> In Blog Title, Make It Multicolored?

Discussion in 'HTML & Website Design' started by phaze3131, Sep 9, 2008.

  1. #1
    I'm curious if this is even possible or maybe I am just dreaming...

    Like having my blog title which is my <h1> in 2 separate colors without screwing up the actual tag.

    Thanks guys!

    Travis
     
    phaze3131, Sep 9, 2008 IP
  2. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you're dreaming unless you're prepared to shove a span in the works.

    e.g

    <h1><span>MyFirstcolour</span>MySecondColour</h1>

    CSS
    h1 { color: red; }
    h1 span{ color: blue; }

    Doesn't have to be a SPAN could be any element really but span is most plain.
     
    wd_2k6, Sep 9, 2008 IP
  3. bavington

    bavington Peon

    Messages:
    74
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    wd_2k6 is right, that is quite literally the easiest and most refined way of doing it.
     
    bavington, Sep 10, 2008 IP
  4. phaze3131

    phaze3131 Well-Known Member

    Messages:
    538
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    140
    #4
    thanks!

    thanks guys, I decided to hard code it using <font color=> that's cool too right?
     
    phaze3131, Sep 10, 2008 IP
  5. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #5
    No, but the browsers won't complain : )

    <font> tags eat babies, cause AIDS, put Bush in the White House, makes people write code in visualBASIC, and are the reason Hitler was ever born.

    And they are deprecated. But they will work : )

    If you don't have a CSS sheet (you prolly have one (or two or three or 6) if this is a template), you can also stick CSS in the <head> of your page:

    <link rel="stylesheet"... blah blah
    <meta whatever blah blah...
    <style>
    h1 {
    color: whatever;
    }
    h1 span {
    color: something else;
    }
    </style>

    </head>
    <body>
    rest of page...

    <h1> Blah Blah Blah <span>blah blah </span></h1>

    OR you could even do this (easier)

    <h1 Blah Blah Blah <span style="color: #0f0;">blue blue blue blue</span></h1>

    This is the non-deprecated way of sticking an inline style. Being inline, though, you'd need to add it to every HTML page... however since you're adding a span to every HTML page anyway and you're thinking of <font> tags, the above should work fine. Inline styles, like the <font> tag, will override any internal (in the <head>) or external (in a link rel="stylesheet" tag) CSS file.
     
    Stomme poes, Sep 11, 2008 IP
  6. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #6
    lol I never knew font tags were at the root of all of these terrible things, it really should be eliminated from markup everywhere if this is the case.
     
    wd_2k6, Sep 11, 2008 IP
  7. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #7
    The More You Know...
     
    Stomme poes, Sep 11, 2008 IP
  8. tomlaut

    tomlaut Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Well I also try to get a multi coloured header title. But I think I did something wrong with the Blogger CSS code. basically I messed everything up .

    I tried to add this span class into the section where the titles is.

    orginally its like this:


    But I unsuccessfully tried to add some span tags to the title. Im honestly a noob once it comes to CSS.:


    So how do I get the title font
    into several colours.

    Thank you in advance
     
    tomlaut, Feb 3, 2009 IP
  9. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Well, what you're working with isn't actually HTML or CSS. It's some kind of weird alien Blogger thingie.

    To see what your real HTML and CSS are, look at your page in your browser and go to View Source. What you see there is the real HTML. Typing in the link to your external CSS file (the link url in is the <link rel="stylesheet" tag) will show you the real CSS.

    This
    font: $pagetitlefont;
    is not CSS. It's using some sort of variable, so whatever Blogger uses (likely PHP) that's what that is.

    Trying to edit a template is the way to madness. I would leave it alone. Even I don't dare to walk that path.
     
    Stomme poes, Feb 3, 2009 IP
  10. tomlaut

    tomlaut Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I think this &amp;amp; thing is done by blogger, because whenever I delete one amp; , it reappears after saving.

    And this font: $pagetitlefont; is defined like this furhter up in the template.

    Hmm PHP , lol getting confusing now.

    I think I just replace the text with a graphic image. thats much easier :D But thanks for your help
     
    tomlaut, Feb 3, 2009 IP
  11. plugandplay

    plugandplay Peon

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    If your blog is a WordPress blog just go into your CSS via the Dashboard and change the color there.
     
    plugandplay, Feb 3, 2009 IP