Link in header

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
aacircle
Regular
Posts: 50
Joined: Sun Oct 02, 2005 11:04 am
Contact:

Link in header

Post by aacircle »

Hello,

Does anyone know how to put a link in the header? I have created my own style using style.css.

Where would I go in style.css file to add a text link in the header area?
aacircle
Regular
Posts: 50
Joined: Sun Oct 02, 2005 11:04 am
Contact:

Post by aacircle »

Ok, found the answer. Edited the index.tpl file. But couldn't get the fonts looking the way I wanted.

My code in the index.tpl is:

Code: Select all

<div id="serendipity_banner">
    <h1><a class="homelink1" href="{$serendipityBaseURL}">{$head_title|@default:$blogTitle}</a></h1>
    <h2><a class="homelink2" href="{$serendipityBaseURL}">{$head_subtitle|@default:$blogDescription}</a></h2>

    <h3><p align="right">
      <a href="http://www.mydomain.com">Link1</a> |
      <a href="http://www.mydomain.com">Link2</a> |
      <a href="http://www.mydomain.com">Link3</a></h3></p>
</div>
<table id="mainpane">
Basically I would like to get Link1, Link2 and Link3 pushed up a little higher, or even the same line as <h2>. Also, how would I override the fonts to choose a specific font and color for these links?

Any feedback would be much appreciated.

Thank you.
aacircle
Regular
Posts: 50
Joined: Sun Oct 02, 2005 11:04 am
Contact:

Post by aacircle »

Hey don't worry everyone... worked it out.

Code: Select all

<h3 style="color: #2A415B; text-align: right">
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Great :)

However a more elegant solution would be to edit your style.css template file and put:

Code: Select all

h3 {
 color: #2A415B;
 text-align: right;
}
inside that file. Then you wouldn't swamp your HTML file with design things. :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
aacircle
Regular
Posts: 50
Joined: Sun Oct 02, 2005 11:04 am
Contact:

Post by aacircle »

Nice suggestion Gavin.

However, I would only like this attribute for <h3> tags in the header.

So I used:

Code: Select all

a.homelink3,
a.homelink3:hover,
a.homelink3:link,
a.homelink3:visited,
#serendipity_banner h3 {
    color: #2A415B;
    text-align: right;
    text-decoration: none;
}
However, it doesn't pickup the color for the links. Instead it uses the color that is default for the rest of the site's links. It only picks up the color for non-link <h3> tags in the header.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

You must address it like this:

Code: Select all

a.homelink3,
a.homelink3:hover,
a.homelink3:link,
a.homelink3:visited,
#serendipity_banner h3,
#serendipity_banner h3 a {
    color: #2A415B;
    text-align: right;
    text-decoration: none;
}
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
aacircle
Regular
Posts: 50
Joined: Sun Oct 02, 2005 11:04 am
Contact:

Post by aacircle »

Garvin! You are a GENIUS. Many many thanks. The support you give to these forums is much appreciated.

We love you! :D
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

LOL. Thanks a lot; you're welcome :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply