PlanetSquires Forums

Support Forums => General Board => Topic started by: Haakon Birkeland on November 10, 2009, 02:14:26 PM

Title: Forum code-font size
Post by: Haakon Birkeland on November 10, 2009, 02:14:26 PM
It might be my FireFox, but I find the font size displayed in code-tags are way small and crippled, making it very hard to read to read â€" even for a "young fart".

Does the forum have an option to increase the font-size?
Title: Re: Forum code-font size
Post by: José Roca on November 10, 2009, 03:45:21 PM
No. The only way that I know is to modify the template. I did that in my forum.
Title: Re: Forum code-font size
Post by: Paul Squires on November 10, 2009, 03:54:11 PM
Can you remember which file in the template you modified? (and as a bonus, what font/size you decided to use).
Title: Re: Forum code-font size
Post by: José Roca on November 10, 2009, 06:23:02 PM
Style.css


/* A code block - maybe even PHP ;). */
.code
{
   font-family: "courier new", "times new roman", monospace;
   font-size: 100%;
   line-height: 1.3em;
   margin: 1px auto 1px auto;
   padding: 1px;
   width: 99%;
   /* Don't wrap its contents, and show scrollbars. */
   white-space: nowrap;
   overflow: auto;
   /* Stop after about 24 lines, and just show a scrollbar. */
   max-height: 24em;
}

Title: Re: Forum code-font size
Post by: Paul Squires on November 10, 2009, 07:01:09 PM
Thanks Jose,

I worked your styles into the existing styles and came up with the following (which seems to create code listings like on your site):


/* A code block - maybe even PHP ;). */
code
{
color: #000000;
background-color: #ffffff;
display: block;
font-family: "courier new", "times new roman", monospace;
        font-size: 100%;
line-height: 1.3em;
/* Put a nice border around it. */
border: 1px solid #000000;
margin: 1px auto 1px auto;
padding: 1px;
width: 99%;
overflow: auto;
white-space: nowrap;
/* Stop after about 24 lines, and just show a scrollbar. */
max-height: 24em;
}

Title: Re: Forum code-font size
Post by: Haakon Birkeland on November 10, 2009, 07:06:42 PM
Now, that's fully readable!

Seems even larger than the main forum text, but I guess some find that just jolly good. Now we only lack syntax highlighting. 8o)
Title: Re: Forum code-font size
Post by: Rolf Brandt on November 10, 2009, 07:09:43 PM
That suits my eyes much more!
Title: Re: Forum code-font size
Post by: Paul Squires on November 11, 2009, 10:08:20 AM
I updated to SMF 2 RC2 last night and the style of course got reset. I went back into the style.css and changed the code to match what I had before. It does not seem to have worked. I'll keep checking to see what I did wrong because I was liking the style yesterday that matched Jose's site.
Title: Re: Forum code-font size
Post by: Haakon Birkeland on November 11, 2009, 10:40:27 AM
I noticed the font was crippled again when sitting in the Screen Resolution thread, but I kept it to myself in case it was my browser acting up ...
Title: Re: Forum code-font size
Post by: Paul Squires on November 11, 2009, 11:04:15 AM
Yeah, it also screwed up my "Member Count" which I was able to fix.

Probably should have left well enough alone and waited to upgrade. Looks like everything is working okay now except for that Code block formatting. I'll get it working eventually.
Title: Re: Forum code-font size
Post by: Haakon Birkeland on November 11, 2009, 11:44:51 AM
Member count ...
Yes, it has flashed my mind a couple of times that there is less stats visible than before you relaunched the forums.