Gossamer Forum
Home : Products : Links 2.0 : Customization :

Changing Font Size

Quote Reply
Changing Font Size
I first want to apologize if this is already on this forum somewhere.

I have been trying to find a way to make the "Categories" list on the home page smaller. I am using Templates, but I haven't found anywhere in there that says how to change the font size.

Any suggestions?

Thanks,
Jackie Garrison

Quote Reply
Re: Changing Font Size In reply to
What templates are you using? Are you using the original links.css?

Either change the css file (if one is used) or just put the html font tag into the templates eg. into home.html

Quote Reply
Re: Changing Font Size In reply to
I cannot remember the name of the template, but it doesn't use the .css

I have attempted to do the font size=2 before the categories code, but to no avail.

Thanks.

Jackie Garrison

Quote Reply
Re: Changing Font Size In reply to
In the categories code is it inside any other tags? Can I see the code that's there?

Quote Reply
Re: Changing Font Size In reply to
As already stated, the best way to change the look of your pages is by using the Cascading Style Sheet (default.css). Are you really sure that you are not using CSS?

Anyway, if you want to modify the font size for categories (without using CSS) you will have to modify sub site_html_print_cat, which is in either site_html_templates.pl or site_html.pl. The first is used by default and the other if you decided to use headers and footers.

Just remember to add a comment to the script if you make any changes; this subroutine is often altered by other MODs (e.g. root build MOD) from the resources section.

Martin Webster
--
Cebidae's UK Internet Resource
http://www.cebidae.co.uk/
Quote Reply
Re: Changing Font Size In reply to
Is always the same old story...
I could'nt find a way to automatically reduce the font size on each category.
I don't use css anymore because it's just more confused.
I've tried to manage it with frontpage but it does'nt work with category (too big compared to the rest of the text).
Cristina

Quote Reply
Re: Changing Font Size In reply to
Cristina,

Take another look at Cebidae's message above. In it he explains that the appearance of the category listings is controlled by code contained in site_html_templates.pl (or site_html.pl). In your case it would be site_html_templates.pl (I seem to remember that you are a templates user). Open that file and look for this section:

Code:
########################################################################################
# THE FOLLOWING DETERMINES YOUR CATEGORY LISTING, IT'S NOT TEMPLATE BASED (YET)! #
########################################################################################

sub site_html_print_cat {
# --------------------------------------------------------
# This routine determines how the list of categories will look.
# We now use a table to split the category name up into two columns.
# For each category you can use the following variables:
#
# $url : The URL to go to that category
# $category_name : The category name with _ and / removed.
# $category_descriptions{$subcat}: The category description (if any).
# $numlinks : The number of links inside that category (and subcategories).
# $mod : The newest link inside of that category.
#
A little further down you will see this:

Code:
# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<dl><dt><strong><a class="link" href="$url">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;
$output .= qq|<small><sup class="new">new</sup></small>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<dd><span class="descript">$description </span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
}
The codes marked in red are HTML tags that you can edit. This is the only way to affect the appearance of category listings. I hope you haven't spent too much time struggling with FrontPage over this!

Best wishes,
Floristan

Quote Reply
Re: Changing Font Size In reply to
Floristan,
I'm too tired to keep on "working" on Links BUT tomorrow morning I'll do everything you posted.
I almost spent a week with frontpage trying to edit the font size in my home.html, I'm pretty close to what I want and, what I want, seems impossible with frontapage!
I'm going to sleep and, if I'm right you're in my same timezone, GOOD NIGHT!
You know...THANKS!!!!
Cristina

Quote Reply
Re: Changing Font Size In reply to
THANK YOU SOOOOO MUCH! It worked. First time. You guys are great!!!!


Jackie

Quote Reply
Re: Changing Font Size In reply to
Because links.css is minimalist you may want to try and add the following line to the a.link style:

font-size : smaller; (could be vsmall, xsmall, xxsmall; I think)

Thus, you may have:

/* Links unvisited links */
a.link:link {
font-size : smaller;
color: #6633FF;
background: #FFFFFF;
}

/* Links visited links */
a.link:visited {
font-size : smaller;
color: #993399;
background: #FFFFFF;
}

/* Links active links (not widely supported) */
a.link:active {
font-size : smaller;
color: #FF6666;
background: #FFFFFF;
}

That's it! By adding three lines of text, every Web page is changed in one go. Just a tad easier that changing the scripts!


Martin Webster
--
Cebidae's UK Internet Resource
http://www.cebidae.co.uk/
Quote Reply
Re: Changing Font Size In reply to
Floristan,
I was sick for 2 days (too much Links 2???) but when I turned on my pc again and tried to change the variables in site_html_templates.pl I finally and easily solved all my problems. What else can I say? Just Thank you, from the bottom of my heart!
Now my site looks like a portal and when it will be done I'll drop you a mail with the address so you'll check my work, O.K.?
Thanks again
Cristina

Quote Reply
Re: Changing Font Size In reply to
Changing the code in the site_html_templates.pl works for most of the pages - but when you go to What's Cool - the font is not only larger, but not of the same family.

I.E. I changed the font family in the .CSS file (which I'm not even utilizing) to Verdana, and changed the site_html_templates.pl code to the following:

# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<dl><nobr><B><FONT FACE="Verdana, Arial" SIZE="-1"><a href="$url">$category_name</a></B><FONT SIZE="-2">($numlinks)</FONT> |;
$output .= qq|<FONT COLOR="#FF0000" SIZE="-2"><sup>new</sup></FONT></FONT>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</nobr>|;
$output .= qq|<BR><FONT FACE="Verdana, Arial" SIZE="-2">$description </font>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
}

which has worked on the Categories page, but it's a totally different font (Arial) and size on the What's Cool page.

What can I do?

Michelle

Quote Reply
Re: Changing Font Size In reply to
When you change font sizes never use size numbers.
use
<BIG></BIG>Increases the size of a font.
<SMALL></SMALL>Decreases the size of a font.
<STRONG></STRONG>Places strong emphasis on text.
<EM></EM>Places emphasis on text.
<H1></H1> … <H6></H6>Creates headings that can be used in HTML documents
The reason you do not want to use font number sizes is this method gives unpredictable results in different web browsers. Try looking at your page in a Mac or linux browser after you use size numbers.